码迷,mamicode.com
首页 > Web开发 > 详细

由于webpack-cli版本问题造成的错误

时间:2018-10-05 19:00:51      阅读:338      评论:0      收藏:0      [点我收藏+]

标签:sel   cycle   lease   filename   mod   highlight   yarn   版本问题   function   

The CLI moved into a separate package: webpack-cli
Please install ‘webpack-cli‘ in addition to webpack itself to use the CLI
-> When using npm: npm i -D webpack-cli
-> When using yarn: yarn add -D webpack-cli
module.js:549
    throw err;
    ^

Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
    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 Object.<anonymous> (E:\vue\vue0308\node_modules\webpack-dev-server\bin\we
bpack-dev-server.js:84:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1

  运行

npm install webpack-cli --save-dev   

 

OK了

由于webpack-cli版本问题造成的错误

标签:sel   cycle   lease   filename   mod   highlight   yarn   版本问题   function   

原文地址:https://www.cnblogs.com/vxianfeng/p/9745263.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!