この問題が発生しています。リポジトリにプッシュするまでプロジェクトは良好ですが、別のディレクトリまたは他のマシンのリポジトリからクローンを作成すると、自分のマシンで動作しているプロジェクトが動作しません。
npm cache clean
node_modules を完全に削除してこの問題を修正しようとしましたが、依存関係を再インストールしましたが、うまくいきませんでした
実行環境:
Webpack バージョン: 2.1.0-beta.25
環境: OS X 10.11.6
ノード v6.2.0、npm 3.8.9
npm デバッグ ファイル:
0 info it worked if it ends with ok
1 verbose cli [ '/Users/armend/.nvm/versions/node/v6.2.0/bin/node',
1 verbose cli '/Users/armend/.nvm/versions/node/v6.2.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@3.8.9
3 info using node@v6.2.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle betconsole@1.0.0~prebuild: betconsole@1.0.0
6 verbose lifecycle betconsole@1.0.0~prebuild: unsafe-perm in lifecycle true
7 verbose lifecycle betconsole@1.0.0~prebuild: PATH: /Users/armend/.nvm/versions/node/v6.2.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/armend/Dropbox/htdocs/testapp/betconsole/node_modules/.bin:/Users/armend/.nvm/versions/node/v6.2.0/bin:/Users/armend/.nvm/versions/node/v6.2.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
8 verbose lifecycle betconsole@1.0.0~prebuild: CWD: /Users/armend/Dropbox/htdocs/testapp/betconsole
9 silly lifecycle betconsole@1.0.0~prebuild: Args: [ '-c', 'rimraf dist' ]
10 silly lifecycle betconsole@1.0.0~prebuild: Returned: code: 0 signal: null
11 info lifecycle betconsole@1.0.0~build: betconsole@1.0.0
12 verbose lifecycle betconsole@1.0.0~build: unsafe-perm in lifecycle true
13 verbose lifecycle betconsole@1.0.0~build: PATH: /Users/armend/.nvm/versions/node/v6.2.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/armend/Dropbox/htdocs/testapp/betconsole/node_modules/.bin:/Users/armend/.nvm/versions/node/v6.2.0/bin:/Users/armend/.nvm/versions/node/v6.2.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
14 verbose lifecycle betconsole@1.0.0~build: CWD: /Users/armend/Dropbox/htdocs/testapp/betconsole
15 silly lifecycle betconsole@1.0.0~build: Args: [ '-c', 'webpack --env.prod -p' ]
16 silly lifecycle betconsole@1.0.0~build: Returned: code: 2 signal: null
17 info lifecycle betconsole@1.0.0~build: Failed to exec build script
18 verbose stack Error: betconsole@1.0.0 build: `webpack --env.prod -p`
18 verbose stack Exit status 2
18 verbose stack at EventEmitter.<anonymous> (/Users/armend/.nvm/versions/node/v6.2.0/lib/node_modules/npm/lib/utils/lifecycle.js:245:16)
18 verbose stack at emitTwo (events.js:106:13)
18 verbose stack at EventEmitter.emit (events.js:191:7)
18 verbose stack at ChildProcess.<anonymous> (/Users/armend/.nvm/versions/node/v6.2.0/lib/node_modules/npm/lib/utils/spawn.js:24:14)
18 verbose stack at emitTwo (events.js:106:13)
18 verbose stack at ChildProcess.emit (events.js:191:7)
18 verbose stack at maybeClose (internal/child_process.js:850:16)
18 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
19 verbose pkgid betconsole@1.0.0
20 verbose cwd /Users/armend/Dropbox/htdocs/testapp/betconsole
21 error Darwin 15.6.0
22 error argv "/Users/armend/.nvm/versions/node/v6.2.0/bin/node" "/Users/armend/.nvm/versions/node/v6.2.0/bin/npm" "run" "build"
23 error node v6.2.0
24 error npm v3.8.9
25 error code ELIFECYCLE
26 error betconsole@1.0.0 build: `webpack --env.prod -p`
26 error Exit status 2
27 error Failed at the betconsole@1.0.0 build script 'webpack --env.prod -p'.
27 error Make sure you have the latest version of node.js and npm installed.
27 error If you do, this is most likely a problem with the betconsole package,
27 error not with npm itself.
27 error Tell the author that this fails on your system:
27 error webpack --env.prod -p
27 error You can get information on how to open an issue for this project with:
27 error npm bugs betconsole
27 error Or if that isn't available, you can get their info via:
27 error npm owner ls betconsole
27 error There is likely additional logging output above.
28 verbose exit [ 1, true ]