亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

運行配置的屬性為什么會報錯,那位大大幫我看看?。?/h1>


{

? "name": "webpack-test",

? "version": "1.0.0",

? "description": "",

? "main": "index.js",

? "scripts": {

? ? "test": "echo \"Error: no test specified\" && exit 1",

? ? "webpack": "webpack --config webpack.config.js --progress --display-moudles --colors --display-reasons"

? },

? "author": "",

? "license": "ISC"

}

配置好了運行:npm run webpack回車

報錯如下:


Unknown argument: display-moudles


npm ERR! Windows_NT 6.1.7601

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.9.5

npm ERR! npm ?v3.10.10

npm ERR! code ELIFECYCLE

npm ERR! [email protected] webpack: `webpack --config webpack.config.js --progr

ess --display-moudles --colors --display-reasons`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the [email protected] webpack script 'webpack --config webpa

ck.config.js --progress --display-moudles --colors --display-reasons'.

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-test 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-moudles --c

olors --display-reasons

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

npm ERR! ? ? npm bugs webpack-test

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

npm ERR! ? ? npm owner ls webpack-test

npm ERR! There is likely additional logging output above.

npm WARN Local package.json exists, but node_modules missing, did you mean to in

stall?


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

npm ERR! ? ? C:\Users\Administrator.PC-20170208RKPQ\imco\webpack-test\npm-debug.

log


C:\Users\Administrator.PC-20170208RKPQ\imco\webpack-test>

求解!

正在回答

9 回答

npm ERR! missing script: wabpack


npm ERR! A complete log of this run can be found in:

npm ERR! ? ? C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2017-09-23T1

6_05_35_229Z-debug.log


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

呵呵,老師在這里埋了個坑,官方文檔Display options中--display-reasons后面有S是復數,所以為什么以上有同學把--display-reason刪了就對了...


2 回復 有任何疑惑可以回復我~
#1

別再那么傻了

贊一個!加上s 就解決了
2017-06-28 回復 有任何疑惑可以回復我~

不行的都是 寫錯單詞了-?。垯z查把

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

解決了么? ?我也是這個問題


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

--display-modules

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

module打錯了 ?應該是 --display-modules

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

C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js 去把這個文件刪了試試


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

跟下面的報錯沒關系

npm ERR! Windows_NT 6.1.7601

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.9.5

npm ERR! npm ?v3.10.10

npm ERR! code ELIFECYCLE

npm ERR! [email protected] webpack: `webpack --config webpack.config.js --progr

ess --display-modules --colors --display-reasons`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the [email protected] webpack script 'webpack --config webpa

ck.config.js --progress --display-modules --colors --display-reasons'.

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-test 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 --c

olors --display-reasons

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

npm ERR! ? ? npm bugs webpack-test

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

npm ERR! ? ? npm owner ls webpack-test

npm ERR! There is likely additional logging output above.

npm WARN Local package.json exists, but node_modules missing, did you mean to in

stall?


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

npm ERR! ? ? C:\Users\Administrator.PC-20170208RKPQ\imco\webpack-test\npm-debug.

log


C:\Users\Administrator.PC-20170208RKPQ\imco\webpack-test>


0 回復 有任何疑惑可以回復我~
#1

給生活一個大大的傻笑

我測試了下,把后面的 --display-reason給刪除了就好了 但是不知道為啥 不知道為什么老師的行 咱們的額不行,求采納
2017-04-15 回復 有任何疑惑可以回復我~
#2

慕粉0300152458 回復 給生活一個大大的傻笑

我也是,檢查了好多遍單詞,發現單詞都是對的,但是就是不行,后來去掉--diaplay -reasonz就可以了
2017-05-05 回復 有任何疑惑可以回復我~

--display-moudles 打錯了 modules

0 回復 有任何疑惑可以回復我~
#1

慕粉1410236786 提問者

跟下面的報錯沒關系吧:
2017-03-15 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

運行配置的屬性為什么會報錯,那位大大幫我看看??!

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號