babel 安裝錯誤

babel 安裝錯誤

因為博主在學(xué)webpack,但是webpack沒法打包ES6及以上版本的JavaScript代碼夏志,所以需要第三方解析器,所以開始在項目中安裝babel酌伊,但是遇到了錯誤敢订,以下是錯誤提示田藐,求解決呀~~~~

Error: Module build failed (from ./node_modules/_babel-loader@7.1.5@babel-loader/lib/index.js):
Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.
    at throwVersionError (G:\vue\vue-study\node_modules\_@babel_helper-plugin-utils@7.0.0@@babel\helper-plugin-utils\lib\index.js:65:11)
    at Object.assertVersion (G:\vue\vue-study\node_modules\_@babel_helper-plugin-utils@7.0.0@@babel\helper-plugin-utils\lib\index.js:13:11)
    at _default (G:\vue\vue-study\node_modules\_@babel_plugin-proposal-object-rest-spread@7.4.4@@babel\plugin-proposal-object-rest-spread\lib\index.js:51:7)
    at G:\vue\vue-study\node_modules\_@babel_helper-plugin-utils@7.0.0@@babel\helper-plugin-utils\lib\index.js:19:12
    at Function.memoisePluginContainer (G:\vue\vue-study\node_modules\_babel-core@6.26.3@babel-core\lib\transformation\file\options\option-manager.js:113:13)
    at Function.normalisePlugin (G:\vue\vue-study\node_modules\_babel-core@6.26.3@babel-core\lib\transformation\file\options\option-manager.js:146:32)
    at G:\vue\vue-study\node_modules\_babel-core@6.26.3@babel-core\lib\transformation\file\options\option-manager.js:184:30
    at Array.map (<anonymous>)
    at Function.normalisePlugins (G:\vue\vue-study\node_modules\_babel-core@6.26.3@babel-core\lib\transformation\file\options\option-manager.js:158:20)
    at OptionManager.mergeOptions (G:\vue\vue-study\node_modules\_babel-core@6.26.3@babel-core\lib\transformation\file\options\option-manager.js:234:36)
    at OptionManager.init (G:\vue\vue-study\node_modules\_babel-core@6.26.3@babel-core\lib\transformation\file\options\option-manager.js:368:12)
    at File.initOptions (G:\vue\vue-study\node_modules\_babel-core@6.26.3@babel-core\lib\transformation\file\index.js:212:65)
    at new File (G:\vue\vue-study\node_modules\_babel-core@6.26.3@babel-core\lib\transformation\file\index.js:135:24)
    at Pipeline.transform (G:\vue\vue-study\node_modules\_babel-core@6.26.3@babel-core\lib\transformation\pipeline.js:46:16)
    at transpile (G:\vue\vue-study\node_modules\_babel-loader@7.1.5@babel-loader\lib\index.js:50:20)
    at Object.module.exports (G:\vue\vue-study\node_modules\_babel-loader@7.1.5@babel-loader\lib\index.js:173:20)

可能是由于版本的問題缆八,導(dǎo)致項目啟動時失敗胞谭,最開始安裝了高版本的babel-loader 恨溜,但是對應(yīng)的babel-core 版本過低符衔,后來我把舊版本的babel-core 卸載,安裝高版本的babel后依舊提示錯誤糟袁,并且卸載時失敗判族,到發(fā)帖時為止,問題尚未解決..

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末项戴,一起剝皮案震驚了整個濱河市形帮,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖辩撑,帶你破解...
    沈念sama閱讀 217,406評論 6 503
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件界斜,死亡現(xiàn)場離奇詭異,居然都是意外死亡合冀,警方通過查閱死者的電腦和手機各薇,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,732評論 3 393
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來君躺,“玉大人峭判,你說我怎么就攤上這事∽亟校” “怎么了林螃?”我有些...
    開封第一講書人閱讀 163,711評論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長俺泣。 經(jīng)常有香客問我疗认,道長,這世上最難降的妖魔是什么砌滞? 我笑而不...
    開封第一講書人閱讀 58,380評論 1 293
  • 正文 為了忘掉前任侮邀,我火速辦了婚禮,結(jié)果婚禮上贝润,老公的妹妹穿的比我還像新娘绊茧。我一直安慰自己,他們只是感情好打掘,可當(dāng)我...
    茶點故事閱讀 67,432評論 6 392
  • 文/花漫 我一把揭開白布华畏。 她就那樣靜靜地躺著,像睡著了一般尊蚁。 火紅的嫁衣襯著肌膚如雪亡笑。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,301評論 1 301
  • 那天横朋,我揣著相機與錄音仑乌,去河邊找鬼。 笑死琴锭,一個胖子當(dāng)著我的面吹牛晰甚,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播决帖,決...
    沈念sama閱讀 40,145評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼厕九,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了地回?” 一聲冷哼從身側(cè)響起扁远,我...
    開封第一講書人閱讀 39,008評論 0 276
  • 序言:老撾萬榮一對情侶失蹤俊鱼,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后畅买,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體并闲,經(jīng)...
    沈念sama閱讀 45,443評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,649評論 3 334
  • 正文 我和宋清朗相戀三年皮获,在試婚紗的時候發(fā)現(xiàn)自己被綠了焙蚓。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 39,795評論 1 347
  • 序言:一個原本活蹦亂跳的男人離奇死亡洒宝,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出萌京,到底是詐尸還是另有隱情雁歌,我是刑警寧澤,帶...
    沈念sama閱讀 35,501評論 5 345
  • 正文 年R本政府宣布知残,位于F島的核電站靠瞎,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏求妹。R本人自食惡果不足惜乏盐,卻給世界環(huán)境...
    茶點故事閱讀 41,119評論 3 328
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望制恍。 院中可真熱鬧父能,春花似錦、人聲如沸净神。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,731評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽鹃唯。三九已至爱榕,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間坡慌,已是汗流浹背黔酥。 一陣腳步聲響...
    開封第一講書人閱讀 32,865評論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留洪橘,地道東北人跪者。 一個月前我還...
    沈念sama閱讀 47,899評論 2 370
  • 正文 我出身青樓,卻偏偏與公主長得像梨树,于是被迫代替她去往敵國和親坑夯。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,724評論 2 354