question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not compatible with core-js@3 dependency

See original GitHub issue
  • I confirm that this is an issue rather than a question.

Bug report

Version

"vuepress": "^1.0.0-alpha.47",
 "core-js": "3.0.1"

Steps to reproduce

  1. yarn add vuepress@next core-js
  2. edit babel.config.js
  presets: [
    [
      '@vue/app',
      {
        useBuiltIns: 'entry',
        corejs: 3,
      },
    ],
  ],

What is expected?

The project is running.

What is actually happening?

Running error: image

If use core-js@2.6.5 , this docs dev can run, but conflicts with the vue project dependencies core-js@3.0.1. How can I fix it?

Other relevant information

  • Your OS: Win 10
  • Node.js version: v10.15.3
  • Browser version: Chrome 73.0.3683.86
  • Is this a global or local install? >local
  • Which package manager did you use for the install? >yarn
  • Does this issue occur when all plugins are disabled?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:8

github_iconTop GitHub Comments

8reactions
darkskygitcommented, May 14, 2019

temporary fix works fine for me: npm i @vue/babel-preset-app@next

7reactions
allen-zhcommented, Apr 15, 2019

+1

when use vuepress with @babel/preset-env@7.4.x (which requires core-js@3), and when core-js under node_modules directly resolves to 3, it will cause vuepress build errors like below.

wait Extracting site metadata...
tip Apply theme @vuepress/theme-default ...
tip Apply plugin container (i.e. "vuepress-plugin-container") ...
tip Apply plugin @vuepress/last-updated (i.e. "@vuepress/plugin-last-updated") ...
tip Apply plugin @vuepress/register-components (i.e. "@vuepress/plugin-register-components") ...
tip Apply plugin @vuepress/active-header-links (i.e. "@vuepress/plugin-active-header-links") ...
tip Apply plugin @vuepress/search (i.e. "@vuepress/plugin-search") ...
tip Apply plugin @vuepress/nprogress (i.e. "@vuepress/plugin-nprogress") ...
[11:23:56 AM] Compiling Client
[11:23:56 AM] Compiling Server
[11:23:59 AM] Compiled Server in 3s
[11:24:03 AM] Compiled Client in 7s
(undefined) ./node_modules/@babel/runtime-corejs2/core-js/array/from.js
Module not found: Error: Can't resolve 'core-js/library/fn/array/from' in '/home/travis/build/max-team/Mars/node_modules/@babel/runtime-corejs2/core-js/array'
resolve 'core-js/library/fn/array/from' in '/home/travis/build/max-team/Mars/node_modules/@babel/runtime-corejs2/core-js/array'
  Parsed request is a module
  using description file: /home/travis/build/max-team/Mars/node_modules/@babel/runtime-corejs2/package.json (relative path: ./core-js/array)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      looking for modules in /home/travis/build/max-team/Mars/node_modules
        using description file: /home/travis/build/max-team/Mars/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: /home/travis/build/max-team/Mars/node_modules/core-js/package.json (relative path: ./library/fn/array/from)
             no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/travis/build/max-team/Mars/node_modules/core-js/library/fn/array/from doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/travis/build/max-team/Mars/node_modules/core-js/library/fn/array/from.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/travis/build/max-team/Mars/node_modules/core-js/library/fn/array/from.jsx doesn't exist
            .vue
              Field 'browser' doesn't contain a valid alias configuration
              /home/travis/build/max-team/Mars/node_modules/core-js/library/fn/array/from.vue doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /home/travis/build/max-team/Mars/node_modules/core-js/library/fn/array/from.json doesn't exist
            .styl
              Field 'browser' doesn't contain a valid alias configuration
              /home/travis/build/max-team/Mars/node_modules/core-js/library/fn/array/from.styl doesn't exist
            as directory
              /home/travis/build/max-team/Mars/node_modules/core-js/library/fn/array/from doesn't exist
...
Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - How to update core-js to core-js@3 dependency?
You update core-js with the following command: npm install --save core-js@^3. If you read the React Docs you will find that the command...
Read more >
babel/polyfill
Babel includes a polyfill that includes a custom regenerator runtime and core-js. This will emulate a full ES2015+ environment (no < Stage 4...
Read more >
How to update core-js to core-js@3 dependency - Ask Ubuntu
You can update core-js by running this command: npm install --save core-js@^3.
Read more >
Npm install is failing while running redash [macOSX]
Upgrade to chokidar 3 with 15x less dependencies. npm WARN ... core-js@<3 is no longer maintained and not recommended for usage due to...
Read more >
babel-plugin-polyfill-corejs3 - npm
babel-plugin-polyfill-corejs3. 0.6.0 • Public • Published 3 months ago. Readme · Code Beta · 2 Dependencies · 269 Dependents · 32 Versions ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found