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

每次保存编译很慢,大概2分钟,一直卡在76%不动了 #3554

Closed
wanqianjin opened this issue Dec 17, 2020 · 4 comments
Closed

Comments

@wanqianjin
Copy link

编译很慢(提问)

Steps to reproduce(问题复现步骤)

使用了推荐的懒加载,会报错 Cannot find module babel-plugin-dynamic
module.exports = {
presets: ['@vue/cli-plugin-babel/preset'],
env: {
development: {
plugins: ['dynamic-import-node']
}
}
}

@wanqianjin
Copy link
Author

使用了推荐的懒加载,会报错 Cannot find module babel-plugin-dynamic
module.exports = {
presets: ['@vue/cli-plugin-babel/preset'],
env: {
development: {
plugins: ['dynamic-import-node']
}
}
}

ERROR Failed to compile with 1 errors 4:00:23 ├F10: PM┤
error in ./src/main.js

Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module '@vue/cli-plugin-babel/preset' from 'D:\workspace\insurance_webs\insurance_web'
at Function.resolveSync [as sync] (D:\workspace\insurance_webs\insurance_web\node_modules\resolve\lib\sync.js:81:15)
at resolveStandardizedName (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\files\plugins.js:101:31)
at resolvePreset (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\files\plugins.js:58:10)
at loadPreset (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\files\plugins.js:77:20)
at createDescriptor (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\config-descriptors.js:154:9)
at D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\config-descriptors.js:109:50
at Array.map ()
at createDescriptors (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\config-descriptors.js:101:10)
at presets (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\config-descriptors.js:47:19)
at mergeChainOpts (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\config-chain.js:315:26)
at D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\config-chain.js:278:7
at buildRootChain (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\config-chain.js:89:20)
at loadPrivatePartialConfig (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\partial.js:57:55)
at Object.loadPartialConfig (D:\workspace\insurance_webs\insurance_web\node_modules@babel\core\lib\config\partial.js:82:18)
at Object. (D:\workspace\insurance_webs\insurance_web\node_modules\babel-loader\lib\index.js:144:26)

@ multi (webpack)-dev-server/client?http://172.16.21.184:9527/sockjs-node (webpack)/hot/only-dev-server.js ./src/main.js

@jaihao
Copy link

jaihao commented Feb 24, 2021

node 什么版本,升级下node 版本试试看

@wanqianjin
Copy link
Author

已解决,升级babel版本即可

@jaihao
Copy link

jaihao commented Mar 4, 2021

@wanqianjin 是升级 babel-loader 版本嘛?是多少的版本?

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