私はきれいなLaravelアプリケーションをMACで作成しました。私が "php artisan serve"を実行すると正しく動作します。Laravel 5.4 "npm run dev"
私はnpm run dev
を実行しようと、私はこのエラー取得:SO上で見られるように
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn node_modules/webpack/bin/webpack.js ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:393:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:508:3
を、私はnpm init
をnode_moduleを削除し、再実行しようとしたが、それは助けにはなりませんでした。
バージョン:
- NPM 2.15.11
- ノードv6.10.1
- Laravelフレームワークここ5.4.23
は、NPMログである:
0 info it worked if it ends with ok
1 verbose cli [ '/opt/local/bin/node', '/opt/local/bin/npm', 'run', 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info predev @
6 info dev @
7 verbose unsafe-perm in lifecycle true
8 info @ Failed to exec dev script
9 verbose stack Error: @ dev: `npm run development`
9 verbose stack Exit status 1
9 verbose stack at EventEmitter.<anonymous> (/opt/local/lib/node_modules/npm/lib/utils/lifecycle.js:217:16)
9 verbose stack at emitTwo (events.js:106:13)
9 verbose stack at EventEmitter.emit (events.js:191:7)
9 verbose stack at ChildProcess.<anonymous> (/opt/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack at emitTwo (events.js:106:13)
9 verbose stack at ChildProcess.emit (events.js:191:7)
9 verbose stack at maybeClose (internal/child_process.js:886:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
10 verbose pkgid @
11 verbose cwd /www/ui
12 error Darwin 15.6.0
13 error argv "/opt/local/bin/node" "/opt/local/bin/npm" "run" "dev"
14 error node v6.10.1
15 error npm v2.15.11
16 error code ELIFECYCLE
17 error @ dev: `npm run development`
17 error Exit status 1
18 error Failed at the @ dev script 'npm run development'.
どんな助けもありがたい。
を多分あなたは多くの時間が、それは解決しないことを私がした – barryp
install' 'NPMを実行する必要があります – user3429660