3

I get this error when I try to use gulp in my Laravel project. I tried deleting node_modules and running npm install, but no lock.

λ gulp
module.js:471
    throw err;
    ^

Error: Cannot find module 'laravel-elixir-vue-2'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\wamp64\www\ibpc\gulpfile.js:3:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

I also tried to add it to package.json.

package.json

{
  "private": true,
  "scripts": {
    "prod": "gulp --production",
    "dev": "gulp watch"
  },
  "devDependencies": {
    "bootstrap-sass": "^3.3.7",
    "gulp": "^3.9.1",
    "jquery": "^3.1.0",
    "laravel-elixir": "^6.0.0-9",
    "laravel-elixir-webpack-official": "^1.0.2",
    "lodash": "^4.16.2",
    "vue": "^2.0.1",
    "vue-resource": "^1.0.3"
  }
}

Any ideas?

2 Answers 2

2

Probably, you don't have laravel-elixir-vue-2 in your package.json file.

Try to install package with the next command:

npm install laravel-elixir-vue-2 --save-dev

Or add in your package.json this line:

"laravel-elixir-vue-2": "^0.3.0"

Sign up to request clarification or add additional context in comments.

2 Comments

I did try to add the line in package.json before, but that didn't help.
npm install laravel-elixir-vue-2 --save-dev solved it.
0

I've got same problem.
I tried to run this command

npm install laravel-elixir-webpack-official

And it fixed...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.