Help us understand the problem. What is going on with this article?

LaravelMIX セットアップ

More than 1 year has passed since last update.

$ npm run dev

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn node_modules/webpack/bin/webpack.js ENOENT
    at _errnoException (util.js:1022:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! -y@1.0.0 development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progr
ules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the -y@1.0.0 development 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!     /home/vagrant/.npm/_logs/2018-03-23T10_24_44_446Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! -y@1.0.0 dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the -y@1.0.0 dev 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!     /home/vagrant/.npm/_logs/2018-03-23T10_24_44_474Z-debug.log

原因

npmバージョンと、nodeバージョンが合っていなかった
※node6.0.0に対しnpm5.7

参考:nodeとnpmのバージョン一覧
https://nodejs.org/ja/download/releases/

やったこと

npmバージョンと、nodeバージョンを揃える
⇒node.js のバージョン管理とバージョン指定インストールについては
 こちらを参照しました
 https://hombre-nuevo.com/javascript/node0005/

インストールやり直し

npm install --no-bin-links

harukingo
2013~2016 新卒でSIer 2017~   社内コンテンツを作るWebエンジニアに転職。勉強中
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした