为了账号安全,请及时绑定邮箱和手机立即绑定

webpack打包的时候出现这个错误

C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:244
                                throw err;
                                ^

Error: Cannot find module 'autoprefixer'
    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 (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
    at Object.<anonymous> (E:\chengXInYouDao\webpack.config.js:4:22)
    at Module._compile (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\v8-compile-cache\v8-compile-cache.js:178: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)
    at Module.require (module.js:596:17)
    at require (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
    at WEBPACK_OPTIONS (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\convert-argv.js:133:13)
    at requireConfig (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\convert-argv.js:135:6)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\convert-argv.js:142:17
    at Array.forEach (<anonymous>)
    at module.exports (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\convert-argv.js:140:15)
    at yargs.parse (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:241:39)
    at Object.parse (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\yargs\yargs.js:552:18)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:219:8
    at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:530:3)
    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)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js:80:2)
    at Module._compile (module.js:652:30)


添加回答

3回答
已采纳
编辑回答
npm install autoprefixer --save
反对 2个回复 2018-06-13
你还没有登录,请先登录注册慕课网帐号
回复
编辑回答
以后遇到这种错误,就是看error那里提示什么,你这个一看就是缺少那个模块,直接安装就可以
反对 1个回复 2018-06-14
你还没有登录,请先登录注册慕课网帐号
回复
编辑回答
Cannot find module 'autoprefixer'
反对 0个回复 2018-06-13
你还没有登录,请先登录注册慕课网帐号
回复
举报
0/150
提交
取消
意见反馈 常见问题 APP下载
官方微信
hv128