npm run build 錯(cuò)誤
> tudolist-vue2.0@1.0.0 build C:\Users\Administrator\Desktop\learn\code\tudolist-vue2.0
> webpack --config webpack.config.js
Insufficient number of arguments or no entry found.
Alternatively, run 'webpack(-cli) --help' for usage info.
Hash: 2fec1d82e4d44391aee7
Version: webpack 4.12.0
Time: 101ms
Built at: 2018-06-22 14:39:20
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
ERROR in Entry module not found: Error: Can't resolve 'C:\Users\Administrator\Desktop\learn\code\tudolist-vue2.0\src\index.js' in 'C:\Users\Administrator\Desktop\learn\code\tudolist-vue2.0'
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! tudolist-vue2.0@1.0.0 build: `webpack --config webpack.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the tudolist-vue2.0@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\Administrator\AppData\Roaming\npm-cache\_logs\2018-06-22T06_39_21_001Z-debug.log
2019-04-29
入口文件引入錯(cuò)誤
2018-08-20
webpack.dev.js文件中path: path.resolve(__dirname, 'dist'),重新設(shè)置下,注意dirname前邊的下劃線
2018-07-10
這個(gè)是webpack版本的問題么,遇到這個(gè)不知道咋解決
2018-07-06
請(qǐng)問這個(gè)問題解決了嗎?我也是一樣的問題。。
2018-06-24
webpack4.0 往后的版本的webpack 啟動(dòng)命令需要加上mode參數(shù) 指定是生產(chǎn)環(huán)境還是開發(fā)環(huán)境