为了账号安全,请及时绑定邮箱和手机立即绑定

求助,报错啊。。。

D:\MeinGit\webpack-demo>npm run webpack


> webpack-demo@1.0.0 webpack D:\MeinGit\webpack-demo

> webpack --config webpack.config.js --progress --display-modules --display-reasons --colors


Hash: c1eb3220fd29ef004e7e

Version: webpack 2.2.1

Time: 627ms

     Asset       Size  Chunks             Chunk Names

index.html  628 bytes          [emitted]


ERROR in Entry module not found: Error: Can't resolve './src/app.js' in 'D:\MeinGit\webpack-demo'

Child html-webpack-plugin for "index.html":

       [0] ./~/lodash/lodash.js 540 kB {0} [built]

           cjs require ./node_modules/lodash/lodash.js [3] ./~/html-webpack-plugin/lib/loader.js!./index.html 1:8-50

       [1] (webpack)/buildin/global.js 509 bytes {0} [built]

           cjs require global [0] ./~/lodash/lodash.js 1:0-41

       [2] (webpack)/buildin/module.js 517 bytes {0} [built]

           cjs require module [0] ./~/lodash/lodash.js 1:0-41

       [3] ./~/html-webpack-plugin/lib/loader.js!./index.html 1.16 kB {0} [built]


npm ERR! Windows_NT 10.0.14393

npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "webpack"

npm ERR! node v6.10.0

npm ERR! npm  v3.10.10

npm ERR! code ELIFECYCLE

npm ERR! webpack-demo@1.0.0 webpack: `webpack --config webpack.config.js --progress --display-modules --display-reasons --colors`

npm ERR! Exit status 2

npm ERR!

npm ERR! Failed at the webpack-demo@1.0.0 webpack script 'webpack --config webpack.config.js --progress --display-modules --display-reasons --colors'.

npm ERR! Make sure you have the latest version of node.js and npm installed.

npm ERR! If you do, this is most likely a problem with the webpack-demo package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR!     webpack --config webpack.config.js --progress --display-modules --display-reasons --colors

npm ERR! You can get information on how to open an issue for this project with:

npm ERR!     npm bugs webpack-demo

npm ERR! Or if that isn't available, you can get their info via:

npm ERR!     npm owner ls webpack-demo

npm ERR! There is likely additional logging output above.


npm ERR! Please include the following file with any support request:

npm ERR!     D:\MeinGit\webpack-demo\npm-debug.log


正在回答

1 回答

Can't resolve './src/app.js' in 'D:\MeinGit\webpack-demo'这俩合不出一个绝对路径,具体resolve方法请看http://javascript.ruanyifeng.com/nodejs/path.html#toc1

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

求助,报错啊。。。

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信