Skip to content

Does not support dependencies that depend on core-js@3 #2046

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

Closed
hq001 opened this issue Nov 29, 2019 · 2 comments
Closed

Does not support dependencies that depend on core-js@3 #2046

hq001 opened this issue Nov 29, 2019 · 2 comments

Comments

@hq001
Copy link

hq001 commented Nov 29, 2019

Bug report

Steps to reproduce

If I use the following configuration it won't compile.
Core-js@3 is already installed in the package I depend on, but it still prompts me that I cannot find the corresponding core-js module. I tried to change core-js to a top-level dependency, but some modules were not found. I found out that this was caused by the core-js version. I guess it is because vuepress has some problems when parsing the module.

Another point is that it is possible to optimize the logs of the vuepress build docs. I found that if there is no module found, all the logs of webpack will be output.

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "useBuiltIns": "usage",
        "corejs": {
          "version": 3,
          "proposals": true
        }
      }
    ]
  ]
}

I changed the version of core-js to 2 to compile successfully. Is this a vuepress issue? I use vuepress build docs

Other relevant information

https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
  Binaries:
    Node: 12.13.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.17.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    @vuepress/core: Not Found
    @vuepress/theme-default: Not Found
    vuepress: 1.2.0 => 1.2.0
  npmGlobalPackages:
    vuepress: Not Found
@JessicaSachs
Copy link
Collaborator

Also having this issue.

@j0Shi82
Copy link

j0Shi82 commented Jan 31, 2020

Was having the same issue. Have core-js@3 in the main package.json so Vuepress is unable to find the differently named modules from core-js@2.

My workaround is tweaking the script that builds Vuepress to first remove core-js and re-add it afterwards. It's a bit of a mess, but I haven't found a better solution to use Vuepress in a project that relies on core-js@3.

yarn remove core-js && vuepress build docs && yarn add core-js

meteorlxy added a commit to meteorlxy/vuepress that referenced this issue Feb 2, 2020
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

3 participants