Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

Babel 7.0.0 integration #179

Open
ppussar opened this issue Sep 14, 2018 · 7 comments
Open

Babel 7.0.0 integration #179

ppussar opened this issue Sep 14, 2018 · 7 comments

Comments

@ppussar
Copy link

ppussar commented Sep 14, 2018

Software version

OS: macos 10.13.6
Node: v10.10.0
NPM: 6.4.1
Any other software related to your bug:

What did you get as the error?

Babel has removed core-js from the runtime package https://github.com/babel/babel/releases/tag/v7.0.0-beta.56

quasar build results in an error using babel 7.0.0-beta.56 or above:
(node:6214) UnhandledPromiseRejectionWarning: Error: Cannot find module '@babel/runtime/core-js/get-iterator'

What were you expecting?

QuasarCli should work with the latest babel 7.0.0 release.

What steps did you take, to get the error?

quasar build using babel 7.0.0

@adamkpurdy
Copy link
Contributor

adamkpurdy commented Sep 16, 2018

I was experiencing this same problem.

I followed along here: http://babeljs.io/docs/en/next/babel-plugin-transform-runtime

Basically I removed the old babel runtime in my package.json : "@babel/runtime": "^7.0.0-beta.56", and replaced it with: "@babel/runtime-corejs2": "^7.0.0",.

I also updated my .bablerc under plugins:

[
      "@babel/plugin-transform-runtime", {
        "corejs": 2,
        "regenerator": true,
        "helpers": true
      }
]

quasar build is now working as expected for me.

@wooliet
Copy link

wooliet commented Oct 2, 2018

I'm using quasar cli v0.17.19 and am running into the "Cannot find module '@babel/runtime/core-js/get-iterator'" issue.

Are there any "official" instructions or update procedures from quasar team?

@adamkpurdy
Copy link
Contributor

@wooliet did you try the approach I posted? You need to update your package.json & your .bablerc in the plugins array.

@wooliet
Copy link

wooliet commented Oct 2, 2018

@adamkpurdy, the problem turned out to be one of our other dependencies.

However, we did try your steps but it did not resolve the issue.

@adamkpurdy
Copy link
Contributor

@wooliet Oh interesting, just curious, but what dependency was the issue for you guys?

@wooliet
Copy link

wooliet commented Oct 2, 2018

@kyriediculous
Copy link

kyriediculous commented Feb 1, 2019

The error appears to be that quasar will throw this when any installed package that uses babel , uses a higher version than quasar's

Then again it doesn't happen on a clean install after installing that package. So somewhere along the way my dependency tree must have gotten messed up.

Edit:

You have to manually roll back the changes in your package-lock like @adamkpurdy said.

I did however roll back to an older version and did not have to change anything in my quasar config file.

OR tell quasar dependencies to use the version that is in your package-lock but I have not tried this and this might break other things.

npm uninstall @babel/runtime -s

npm install @babel/[email protected] -s

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

No branches or pull requests

4 participants