Gulp: Can't find module laravel-elixir-vue-2 '

I am getting this error when I try to use gulp in my Laravel project. I tried to remove node_modules and run npm install

but not block.

Ξ» 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 have also tried adding 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?

+3


source to share


2 answers


You may not have laravel-elixir-vue-2

in your file package.json

.

Try to install the package with the following command:

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



Or add to your package.json

this line:

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

+2


source


I have the same problem.
I tried to run this command

npm install laravel-elixir-webpack-official

      



And that's fixed ...

0


source







All Articles