Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webpack support #97

Open
vcarel opened this issue Sep 15, 2017 · 4 comments
Open

Add webpack support #97

vcarel opened this issue Sep 15, 2017 · 4 comments

Comments

@vcarel
Copy link

vcarel commented Sep 15, 2017

We use Webpack to package our node app, but we can't make pmx work because it looks for some conf in the package.json.

We get the below exception on require(pmx)

1|myapp| TypeError: Path must be a string. Received undefined
1|myapp|     at assertPath (path.js:28:11)
1|myapp|     at Object.dirname (path.js:1352:5)
1|myapp|     at findPackageJson (/[...]myapp/build/ssr/webpack:/node_modules/pmx/lib/configuration.js:24:36)
1|myapp|     at Object.module.exports.Options.init (/[...]myapp/build/ssr/webpack:/node_modules/pmx/lib/configuration.js:43:26)
1|myapp|     at Object.module.exports.module.exports (/[...]myapp/build/ssr/webpack:/node_modules/pmx/lib/pmx.js:31:31)

We used Webpack mostly for convenience, so we might fallback to a "classic" deployment with node_modules and so on. However I was wondering if it would be an easy fix on your side to not look for package.json (besides it's not a documented feature... is it?)

Thanks :-)

@dominik1001
Copy link

dominik1001 commented Mar 20, 2018

I am having a similar issue using babel-watch.

    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.relative (path.js:1262:5)
    at ChildProcess.app.on ([...]/node_modules/babel-watch/babel-watch.js:282:37)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at emit (internal/child_process.js:772:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
error An unexpected error occurred: "Command failed.

@edith4cim
Copy link

Same issue here, unfortunately not using Webpack isn't an option for us. Did you find any workaround to be able to use PMX with Webpack?

@vcarel
Copy link
Author

vcarel commented Apr 10, 2018

@edith4cim We removed webpack... :-(

@mrs-eload
Copy link

Same issue here, we had to remove PMX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants