三体XRaindrop
2018-06-01 15:56
> todolist@1.0.0 build E:\work\todoList
> webpack --config webpack.config.js
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
- webpack-cli (https://github.com/webpack/webpack-cli)
The original webpack full-featured CLI.
- webpack-command (https://github.com/webpack-contrib/webpack-command)
A lightweight, opinionated webpack CLI.
We will use "npm" to install the CLI via "npm install -D".
Which one do you like to install (webpack-cli/webpack-command):
One CLI needs to be installed alongside webpack to use the CLI.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! todolist@1.0.0 build: `webpack --config webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todolist@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Tom\AppData\Roaming\npm-cache\_logs\2018-06-01T07_54_45_313Z-debug.log
Which one do you like to install (webpack-cli/webpack-command):
提示输入时,输出webpack-cli即可
楼主,解决了吗,可以分享下嘛
解决了吗
以上两个方法都试过了,没用
在webpack.config.js文件添加
const VueLoaderPlugin = require('vue-loader/lib/plugin')
module.exports = {
//里面添加:
plugins: [
new VueLoaderPlugin()
]
}
这样就不会报错了
那个都没有起效
webpack-cli和webpack-commond 选一个
输入npm install webpack-cli -g或者npm install webpack-commond -g即可,必须加-g ,也就是全局安装,否则不行
Vue+Webpack打造todo应用
84606 学习 · 787 问题
相似问题
回答 2
回答 2
回答 2
回答 4
回答 4