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

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

為什么出現這種BUG

ERROR in Entry module not found: Error: Can't resolve 'babel' in 'D:\趣丸\WebPack\webpack-demo'

BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.

? ? ? ? ? ? ? ? ?You need to specify 'babel-loader' instead of 'babel'.


ERROR in ? Error: Child compilation failed:

? Module not found: Error: Can't resolve 'babel' in 'D:\趣丸\WebPack\webpack-demo' ?BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when usin ?g loaders.

? ? ? ? ? ? ? ? ? ?You need to specify 'babel-loader' instead of 'babel'.:

? Error: Can't resolve 'babel' in 'D:\趣丸\WebPack\webpack-demo'

? BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when usin ?g loaders.

? ? ? ? ? ? ? ? ? ?You need to specify 'babel-loader' instead of 'babel'.


? - compiler.js:76

? ? [webpack-demo]/[html-webpack-plugin]/lib/compiler.js:76:16


? - Compiler.js:280 Compiler.<anonymous>

? ? [webpack-demo]/[webpack]/lib/Compiler.js:280:10


? - Compiler.js:480

? ? [webpack-demo]/[webpack]/lib/Compiler.js:480:13


? - Tapable.js:138 next

? ? [webpack-demo]/[tapable]/lib/Tapable.js:138:11


? - CachePlugin.js:62 Compiler.<anonymous>

? ? [webpack-demo]/[webpack]/lib/CachePlugin.js:62:5


? - Tapable.js:142 Compiler.applyPluginsAsyncSeries

? ? [webpack-demo]/[tapable]/lib/Tapable.js:142:13


? - Compiler.js:477

? ? [webpack-demo]/[webpack]/lib/Compiler.js:477:10


? - Tapable.js:131 Compilation.applyPluginsAsyncSeries

? ? [webpack-demo]/[tapable]/lib/Tapable.js:131:46


? - Compilation.js:640

? ? [webpack-demo]/[webpack]/lib/Compilation.js:640:19


? - Tapable.js:131 Compilation.applyPluginsAsyncSeries

? ? [webpack-demo]/[tapable]/lib/Tapable.js:131:46


? - Compilation.js:631

? ? [webpack-demo]/[webpack]/lib/Compilation.js:631:11


? - Tapable.js:131 Compilation.applyPluginsAsyncSeries

? ? [webpack-demo]/[tapable]/lib/Tapable.js:131:46


? - Compilation.js:626

? ? [webpack-demo]/[webpack]/lib/Compilation.js:626:10


? - Tapable.js:131 Compilation.applyPluginsAsyncSeries

? ? [webpack-demo]/[tapable]/lib/Tapable.js:131:46


? - Compilation.js:622 sealPart2

? ? [webpack-demo]/[webpack]/lib/Compilation.js:622:9


? - Tapable.js:131 Compilation.applyPluginsAsyncSeries

? ? [webpack-demo]/[tapable]/lib/Tapable.js:131:46


? - Compilation.js:570 Compilation.seal

? ? [webpack-demo]/[webpack]/lib/Compilation.js:570:8


? - Compiler.js:474

? ? [webpack-demo]/[webpack]/lib/Compiler.js:474:16


? - Tapable.js:225

? ? [webpack-demo]/[tapable]/lib/Tapable.js:225:11


? - Compilation.js:472

? ? [webpack-demo]/[webpack]/lib/Compilation.js:472:11


? - Compilation.js:443

? ? [webpack-demo]/[webpack]/lib/Compilation.js:443:13


? - next_tick.js:67 _combinedTickCallback

? ? internal/process/next_tick.js:67:7


? - next_tick.js:98 process._tickCallback

? ? internal/process/next_tick.js:98:9



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

? ? ? ?[0] ./~/html-webpack-plugin/lib/loader.js!./index.html 508 bytes {0} [built]


? ? ERROR in ./~/html-webpack-plugin/lib/loader.js!./index.html

? ? Module not found: Error: Can't resolve 'babel' in 'D:\趣丸\WebPack\webpack-demo'

? ? BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.

? ? ? ? ? ? ? ? ? ? ?You need to specify 'babel-loader' instead of 'babel'.

? ? ?@ ./~/html-webpack-plugin/lib/loader.js!./index.html 1:8-50


npm ERR! Windows_NT 6.1.7601

npm ERR! argv "D:\\nodeJS\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "webpack"

npm ERR! node v5.10.1

npm ERR! npm ?v4.1.2

npm ERR! code ELIFECYCLE

npm ERR! [email protected] webpack: `webpack --config webpack.config.js --progress --display-modules --colors`

npm ERR! Exit status 2

npm ERR!

npm ERR! Failed at the [email protected] webpack script 'webpack --config webpack.config.js --progress --display-modules --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 --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:\趣丸\WebPack\webpack-demo\npm-debug.log


正在回答

7 回答

You need to specify 'babel-loader' instead of 'babel'.?
他這里說了,你用的是什么版本?

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

不浪漫

這不是老師嗎 是不是該弄點收費課程了,感覺同學們webpack也學的差不多了
2017-05-10 回復 有任何疑惑可以回復我~
#2

嚴寒對酷暑

老師,這是在哪里修改,我找不到
2018-01-11 回復 有任何疑惑可以回復我~

loader: 'babel', 改成?loader: 'babel-loader',

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

我也是這個錯

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

?loader: 'babel', 改成了 loader: 'babel-loader',

依然報這個錯

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

UncleHu

你解決了嗎?我也是這個錯
2017-09-27 回復 有任何疑惑可以回復我~

webpack2要求必須加-loader了


?loader: 'babel', 改成?loader: 'babel-loader',

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

webpack2要求必須加-loader了

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

配置的loader名稱改為下面的就行了

? loader: 'babel-loader',

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

嚴寒對酷暑

是什么意思,在哪里修改?
2018-01-11 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

為什么出現這種BUG

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

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

幫助反饋 APP下載

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

公眾號

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