Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

依赖安装缺少babel-preset-es2015 #11

Open
wangtaigong opened this issue Nov 15, 2020 · 1 comment
Open

依赖安装缺少babel-preset-es2015 #11

wangtaigong opened this issue Nov 15, 2020 · 1 comment

Comments

@wangtaigong
Copy link

依赖安装后,运行yarn serve的时候, 会报错误
安装工具: yarn

ERROR Error: Cannot find module 'babel-preset-es2015' from 'F:\github\vue-gn-components'
Error: Cannot find module 'babel-preset-es2015' from 'F:\github\vue-gn-components'
at Function.resolveSync [as sync] (F:\github\vue-gn-components\node_modules\resolve\lib\sync.js:90:15)
at resolveStandardizedName (F:\github\vue-gn-components\node_modules@babel\core\lib\config\files\plugins.js:101:31)
at resolvePreset (F:\github\vue-gn-components\node_modules@babel\core\lib\config\files\plugins.js:58:10)
at loadPreset (F:\github\vue-gn-components\node_modules@babel\core\lib\config\files\plugins.js:77:20)
at createDescriptor (F:\github\vue-gn-components\node_modules@babel\core\lib\config\config-descriptors.js:154:9)
at F:\github\vue-gn-components\node_modules@babel\core\lib\config\config-descriptors.js:109:50
at Array.map ()
at createDescriptors (F:\github\vue-gn-components\node_modules@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (F:\github\vue-gn-components\node_modules@babel\core\lib\config\config-descriptors.js:101:10)
at presets (F:\github\vue-gn-components\node_modules@babel\core\lib\config\config-descriptors.js:47:19)
error Command failed with exit code 1.

我本地的解决方式: 1,安装@babel/preset-env 2,将.babelrc中的presets中babel-preset-es2015修改为@babel/preset-env

@fansjay
Copy link

fansjay commented Dec 23, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants