> 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
入口文件引入错误
webpack.dev.js文件中path: path.resolve(__dirname, 'dist'),重新设置下,注意dirname前边的下划线
这个是webpack版本的问题么,遇到这个不知道咋解决
请问这个问题解决了吗?我也是一样的问题。。
webpack4.0 往后的版本的webpack 启动命令需要加上mode参数 指定是生产环境还是开发环境