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 error at yarn start #20

Open
HirenPatel2791 opened this issue Sep 19, 2019 · 3 comments
Open

Babel error at yarn start #20

HirenPatel2791 opened this issue Sep 19, 2019 · 3 comments

Comments

@HirenPatel2791
Copy link

HirenPatel2791 commented Sep 19, 2019

Issue

$ babel-node tools/run start
/HOME/react-dashboard-try/node_modules/@babel/core/lib/config/full.js:135
    throw e;
    ^

Error: [BABEL] /HOME/react-dashboard-try/tools/run.js:   
Error: [BABEL] /HOME/react-dashboard-try/tools/run.js: 
As of v7.0.0-beta.55, we've removed Babel's Stage presets.
Please consider reading our blog post on this decision at
https://babeljs.io/blog/2018/07/27/removing-babels-stage-presets
for more details. TL;DR is that it's more beneficial in the
  long run to explicitly add which proposals to use. 

For a more automatic migration, we have updated babel-upgrade,
https://github.com/babel/babel-upgrade to do this for you with
"npx babel-upgrade".If you want the same configuration as before:

{
  "plugins": [
    // Stage 2
    ["@babel/plugin-proposal-decorators", { "legacy": true }],
    "@babel/plugin-proposal-function-sent",
    "@babel/plugin-proposal-export-namespace-from",
    "@babel/plugin-proposal-numeric-separator",
    "@babel/plugin-proposal-throw-expressions",
    // Stage 3
    "@babel/plugin-syntax-dynamic-import",
    "@babel/plugin-syntax-import-meta",
    ["@babel/plugin-proposal-class-properties", { "loose": false }],
    "@babel/plugin-proposal-json-strings"
  ]
}
 If you're using the same configuration across many separate projects,
keep in mind that you can also create your own custom presets with
whichever plugins and presets you're looking to use.

module.exports = function() {
  return {
    plugins: [
      require("@babel/plugin-syntax-dynamic-import"),
      [require("@babel/plugin-proposal-decorators"), { "legacy": true }],
      [require("@babel/plugin-proposal-class-properties"), { "loose": false }],
    ],
    presets: [
      // ...
    ],
  };
};

(While processing: "/HOME/react-dashboard-try/node_modules/@babel/preset-stage-2/lib/index.js")
   at _default (/HOME/react-dashboard-try/node_modules/@babel/preset-stage-2/lib/index.js:9:9)
   at loadDescriptor (/HOME/react-dashboard-try/node_modules/@babel/core/lib/config/full.js:165:14)
   at cachedFunction (/HOME/react-dashboard-try/node_modules/@babel/core/lib/config/caching.js:33:19)
   at loadPresetDescriptor (/HOME/react-dashboard-try/node_modules/@babel/core/lib/config/full.js:235:63)
   at config.presets.reduce (/HOME/react-dashboard-try/node_modules/@babel/core/lib/config/full.js:77:21)
   at Array.reduce (<anonymous>)
   at recurseDescriptors (/HOME/react-dashboard-try/node_modules/@babel/core/lib/config/full.js:74:38)
   at loadFullConfig (/HOME/react-dashboard-try/node_modules/@babel/core/lib/config/full.js:108:6)
   at loadOptions (/HOME/react-dashboard-try/node_modules/@babel/core/lib/config/index.js:27:36)
   at OptionManager.init (/HOME/react-dashboard-try/node_modules/@babel/core/lib/index.js:231:36)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Reproduce

  • Clone repo as instructed in README
  • yarn install
  • yarn start

node v10.16.3
yarn v1.17.3

@milad1367
Copy link

I have the same error

1 similar comment
@thebestlucc
Copy link

I have the same error

@sidor269
Copy link

sidor269 commented Nov 5, 2019

Same error!

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

4 participants