Webpack安装问题; npm运行构建失败

时间:2020-05-15 02:54:48

标签: javascript node.js file npm webpack

我是编程新手,最近下载了webpack和npm,但是当我在控制台中运行以下命令时:

npm run build

我收到以下错误:

PS C:\Users\andre\Desktop\wepack-inicial> npm run build

wepack-inicial@1.0.0 build C:\Users\andre\Desktop\wepack-inicial
webpack


Insufficient number of arguments or no entry found.
Alternatively, run 'webpack(-cli) --help' for usage info.

Hash: 0899d81d7e62569a3432
Version: webpack 4.43.0
Time: 32ms
Built at: 14/05/2020 8:57:24 p. m.

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/configuration/mode/

ERROR in Entry module not found: Error: Can't resolve './src' in 'C:\Users\andre\Desktop\wepack-inicial'
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! wepack-inicial@1.0.0 build: `webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the wepack-inicial@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\andre\AppData\Roaming\npm-cache\_logs\2020-05-15T01_57_24_619Z-debug.log
PS C:\Users\andre\Desktop\wepack-inicial> npm install -g express-generator

希望您能帮助我,谢谢。

0 个答案:

没有答案