Skip to content

Cannot find module 'core-js/library/xxx' when import element-ui #2275

Open
@showmethecode9527

Description

@showmethecode9527
  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

# Vue CLI v4.2.3
$ vue create vuepress-test # use preset 'default' or 'Manually select features'
$ cd vuepress-test
$ npm i -S element-ui
$ npm i -D vuepress

Then create docs/README.md, docs/.vuepress/enhanceApp.js

// docs/.vuepress/enhanceApp.js
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

export default ({
  Vue
}) => {
  Vue.use(ElementUI)
}

Then run vuepress dev docs and open the browser's console

What is expected?

build success

What is actually happening?

build error

Other relevant information

  • Output of npx vuepress info in my VuePress project:
  System:
    OS: Windows 10 10.0.18362
    CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
  Binaries:
    Node: 12.16.0 - D:\nvm_nodejs\node.EXE
    Yarn: Not Found
    npm: 6.13.4 - D:\nvm_nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    @vuepress/core: Not Found
    @vuepress/theme-default: Not Found
    vuepress: ^1.4.0 => 1.4.0
  npmGlobalPackages:
    vuepress: Not Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: core team reviewPriority issues for the core team to reviewtype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions