學(xué)了第二節(jié)課:npm run build 時(shí)報(bào)錯(cuò)
PS D:\BaiduNetdiskDownload\vue-learn> npm run build
> vue-learn@1.0.0 build D:\BaiduNetdiskDownload\vue-learn
> 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.
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no): n
You need to install 'webpack-cli' to use webpack via CLI.
You can also install the CLI manually.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-learn@1.0.0 build: `webpack --config webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-learn@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\gp\AppData\Roaming\npm-cache\_logs\2019-08-01T01_45_13_541Z-debug.log
PS D:\BaiduNetdiskDownload\vue-learn>
是不是 因?yàn)?我 之前安裝了 全局的腳手架 ?
2019-08-25
2019-08-10
webpack4 和視頻里需要的包有區(qū)別
針對(duì)老師的教程,我上傳了自己的代碼。老師教程中用的是webpack3.x,有很多包已經(jīng)被棄用了,我改用了官網(wǎng)推薦的包,另外我用的是最新版本的webpack4.x,不會(huì)出現(xiàn)安裝報(bào)錯(cuò)的問題。 下面是我的項(xiàng)目,歡迎參考: https://github.com/carrieguo/vue.js-todolist
2019-08-01
不是? 這個(gè)版本的webpack需要安裝安裝 webpack-cli