使用npm run build時,出現下面的問題
使用npm run build時,出現下面的問題。檢查代碼,應該是沒有寫錯的。怎么解決呢?
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `webpack --config webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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!? ? ?/Users/mymac/.npm/_logs/2018-09-18T07_41_36_761Z-debug.log
我按照教學視頻配置的代碼如下:
2018-09-24
2018-09-24
這個可能是你有在webpack.config.js中加入plugins(我多裝了style-loader url-loader file-loader)
2018-09-18
這個是新版本的webpack有更改過的緣故,只要把<style></style>中間的樣式注釋掉就不會報錯,應該是少了一個關于style的插件,但具體是什么我暫時也不知道