Nuxt.js: error core-js

Created on 22 Mar 2019  ·  9Comments  ·  Source: nuxt/nuxt.js

image
image

This question is available on Nuxt community (#c8899)

All 9 comments

This issue as been imported as question since it does not respect nuxt.js issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/nuxt.js/issues/c8899.

"nuxt": "^2.5.1",
"vue": "^2.5.17"

Hi. Can you please follow these steps:

  • Add core-js@2
  • Ensure no .babelrc or babel.config.js or babel config in nuxt.config exists
  • Remove yarn.lock / package-lock.json and resintall

Hello pi0!
I have same issue on 2.6.1 version
This is little bit weird if core-js@2 is dependence of nuxt.js and users will need to add them manually, don't you?

@ivandata It is a dependency of nuxt indeed! But will be hoisted by yarn/npm if some other dependency requires core-js@3. Adding to top-level package.json prevents this.

More explained in 2.6.0 notes.

got it, thank you!

yarn add core-js
如果还不行
删除 node_modules,然后使用 yarn 安装,不要使用 cnpm 安装;

@pi0 is the recommendation to still use corejs 2 with it being deprecated? If so what are the reasons for the strong recommendation in that changelog?

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maicong picture maicong  ·  3Comments

surmon-china picture surmon-china  ·  3Comments

msudgh picture msudgh  ·  3Comments

VincentLoy picture VincentLoy  ·  3Comments

gary149 picture gary149  ·  3Comments