You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure yo
u have a compatible version of @babel/core, it is likely that something in your bu
ild 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 se
e what is calling Babel.
at throwVersionError (D:\develop\WebstormProjects\2haohr\packages\mp\node_modu
les\@babel\helper-plugin-utils\lib\index.js:65:11)
at Object.assertVersion (D:\develop\WebstormProjects\2haohr\packages\mp\node_m
odules\@babel\helper-plugin-utils\lib\index.js:13:11)
at D:\develop\WebstormProjects\2haohr\packages\mp\node_modules\@babel\plugin-p
roposal-decorators\lib\index.js:19:7
at D:\develop\WebstormProjects\2haohr\packages\mp\node_modules\@babel\helper-p
lugin-utils\lib\index.js:19:12
at Function.memoisePluginContainer (D:\develop\WebstormProjects\2haohr\package
s\mp\node_modules\@tarojs\mini-runner\node_modules\babel-core\lib\transformation\f
ile\options\option-manager.js:113:13)
at Function.normalisePlugin (D:\develop\WebstormProjects\2haohr\packages\mp\no
de_modules\@tarojs\mini-runner\node_modules\babel-core\lib\transformation\file\opt
ions\option-manager.js:146:32)
at D:\develop\WebstormProjects\2haohr\packages\mp\node_modules\@tarojs\mini-ru
nner\node_modules\babel-core\lib\transformation\file\options\option-manager.js:184
:30
at Array.map (<anonymous>)
at Function.normalisePlugins (D:\develop\WebstormProjects\2haohr\packages\mp\n
ode_modules\@tarojs\mini-runner\node_modules\babel-core\lib\transformation\file\op
tions\option-manager.js:158:20)
at OptionManager.mergeOptions (D:\develop\WebstormProjects\2haohr\packages\mp\
node_modules\@tarojs\mini-runner\node_modules\babel-core\lib\transformation\file\o
ptions\option-manager.js:234:36)
at OptionManager.init (D:\develop\WebstormProjects\2haohr\packages\mp\node_mod
ules\@tarojs\mini-runner\node_modules\babel-core\lib\transformation\file\options\o
ption-manager.js:368:12)
at File.initOptions (D:\develop\WebstormProjects\2haohr\packages\mp\node_modul
es\@tarojs\mini-runner\node_modules\babel-core\lib\transformation\file\index.js:21
2:65)
at new File (D:\develop\WebstormProjects\2haohr\packages\mp\node_modules\@taro
js\mini-runner\node_modules\babel-core\lib\transformation\file\index.js:135:24)
at Pipeline.transform (D:\develop\WebstormProjects\2haohr\packages\mp\node_mod
ules\@tarojs\mini-runner\node_modules\babel-core\lib\transformation\pipeline.js:46
:16)
at Object.wxTransformerLoader (D:\develop\WebstormProjects\2haohr\packages\mp\
node_modules\@tarojs\mini-runner\dist\loaders\wxTransformerLoader.js:93:38)
at LOADER_EXECUTION (D:\develop\WebstormProjects\2haohr\packages\mp\node_modul
es\loader-runner\lib\LoaderRunner.js:119:14)
at runSyncOrAsync (D:\develop\WebstormProjects\2haohr\packages\mp\node_modules
\loader-runner\lib\LoaderRunner.js:120:4)
at iterateNormalLoaders (D:\develop\WebstormProjects\2haohr\packages\mp\node_m
odules\loader-runner\lib\LoaderRunner.js:232:2)
at Array.<anonymous> (D:\develop\WebstormProjects\2haohr\packages\mp\node_modu
les\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (D:\develop\WebstormProjects\2haohr\packages\mp\node_modul
es\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at D:\develop\WebstormProjects\2haohr\packages\mp\node_modules\enhanced-resolv
e\lib\CachedInputFileSystem.js:91:9
at D:\develop\WebstormProjects\2haohr\packages\mp\node_modules\graceful-fs\gra
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_con
text.js:63:3) {
code: 'BABEL_VERSION_UNSUPPORTED',
version: '6.26.3',
range: '^7.0.0-0'
}
� 编译失败.
相关平台
微信小程序
小程序基础库: 2.14.0
使用框架: React
复现步骤
1、我从v2.1.3升级到v2.2.15,更新package.json
2、config babel部分:
3、出现错误:Requires Babel "^7.0.0-0", but was loaded with "6.26.3". 编译失败.
期望结果
编译成功
实际结果
编译失败
环境信息
补充信息
报错内容:
我尝试过升级babel到7:@babel/xxx的写法:
对应
config babel部分改动:
也是一样的报错,然后我尝试了强制降级到babel6:"@babel/core": "6.0.0-bridge.1", 也失败了
The text was updated successfully, but these errors were encountered: