Add webpack support
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 :-)
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.
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?
@edith4cim We removed webpack... :-(
Same issue here, we had to remove PMX.