ubuntu 18中的webpack混合错误

时间:2018-07-20 16:55:55

标签: node.js laravel npm webpack vue.js

当我运行(npm run watch)时,会发生此错误!

  

@开发/ home / nader / Desktop / asd / blog

     

cross-env NODE_ENV =开发node_modules / webpack / bin / webpack.js --progress-隐藏模块--config = node_modules / laravel-mix / setup / webpack.config.js“ --watch”

module.js:549throw err;
    ^

Error: Cannot find module '/home/nader/Desktop/asd/blog/node_modules/laravel-mix/setup/webpack.config.js'

at Function.Module._resolveFilename (module.js:547:15)

at Function.Module._load (module.js:474:25)

at Module.require (module.js:596:17)

at require (internal/module.js:11:18)

at requireConfig (/home/nader/Desktop/asd/blog/node_modules/webpack/bin/convert-argv.js:97:18)

at /home/nader/Desktop/asd/blog/node_modules/webpack/bin/convert-argv.js:104:17

at Array.forEach (<anonymous>)

at module.exports (/home/nader/Desktop/asd/blog/node_modules/webpack/bin/convert-argv.js:102:15)

at yargs.parse (/home/nader/Desktop/asd/blog/node_modules/webpack/bin/webpack.js:171:41)

at Object.Yargs.self.parse (/home/nader/Desktop/asd/blog/node_modules/yargs/yargs.js:533:18)

npm错误!代码ELIFECYCLE

... 。 ..

请帮助吗????

1 个答案:

答案 0 :(得分:0)

路径webpack.config.js上是否有文件/home/nader/Desktop/asd/blog/node_modules/laravel-mix/setup/? npm表示无法在此处找到软件包。尝试npm重新安装laravel-mix软件包