zkat / npx

execute npm package binaries (moved)

Home Page:https://github.com/npm/npx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack-cli postinstall script fails to run

csimi opened this issue · comments

There seems to be some sort of module resolution bug.

Reproduce:

docker run --rm node:12-alpine npx webpack-cli@3.3.2 help

Result:

internal/modules/cjs/loader.js:626
    throw err;
    ^

Error: Cannot find module '/root/.npm/_npx/1/lib/node_modules/webpack-cli/bin/opencollective.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-cli@3.3.2 postinstall: `node ./bin/opencollective.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack-cli@3.3.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-06-06T06_49_47_772Z-debug.log
Install for [ 'webpack-cli@latest' ] failed with code 1