npm run serve error: You must pass the `"decoratorsLegacy": true` option to @babel/preset-stage-2
See original GitHub issueVersion
3.0.0-beta.6
Reproduction link
Steps to reproduce
- Vue CLI v3.0.0-beta.6
- ? Please pick a preset: Manually select features
- ? Check the features needed for your project: TS, Router, Vuex, CSS Pre-processors, Linter
- ? Use class-style component syntax? Yes
- ? Use Babel alongside TypeScript for auto-detected polyfills? Yes
- ? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): LESS
- ? Pick a linter / formatter config: Airbnb
- ? Pick additional lint features:
- ? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config files
- ? Save this as a preset for future projects? No
vue-cli will install @babel/preset-stage-2@7.0.0-beta.45 and npm run serve will throw error:
The new decorators proposal is not supported yet. You must pass the
“decoratorsLegacy”: true option to @babel/preset-stage-2
see: https://github.com/babel/babel/blob/master/packages/babel-preset-stage-2/src/index.js#L29
forgive my poor English
What is expected?
server success
What is actually happening?
The new decorators proposal is not supported yet. You must pass the "decoratorsLegacy": true
option to @babel/preset-stage-2
Issue Analytics
- State:
- Created 5 years ago
- Reactions:65
- Comments:26 (1 by maintainers)
Top Results From Across the Web
Starting the dev server in project generated by vue cli 3
This created a vue-projject foler. Then I changed the directory into that folder and ran npm run serve command. But i get the...
Read more >Starting the dev server in project generated by vue cli 3
This created a vue-projject foler. Then I changed the directory into that folder and ran npm run serve command. But i get the...
Read more >babel/preset-stage-2
As of Babel v7, all the stage presets have been deprecated. ... npm install --save-dev @babel/preset-stage-2. Copy. Usage. With a configuration file ...
Read more >vue.js - vue-cli(3.0.0-beta.6)创建项目后使用yarn serve就报错
或者github的其他解决方案:npm run serve error: You must pass the "decoratorsLegacy": true option to @babel/preset-stage-2.
Read more >在vue cli 3生成的项目中启动dev服务器 - CSDN博客
然后我将目录更改为该文件夹并运行npm run serve命令. ... You must pass the `"decoratorsLegacy": true` option to @babel/preset-stage-2 (While ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had solved the problem by using a custom config by
@babel/preset-env
in file .babelrc. Working well, like this:Guys while this issue is not fixed, simply use this temporary solution: Specify the old version of
@babel/preset-stage-2
indevDependencies
then run
npm run install