Skip to content
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

vue ui not working #3406

Closed
seijikohara opened this issue Feb 2, 2019 · 18 comments
Closed

vue ui not working #3406

seijikohara opened this issue Feb 2, 2019 · 18 comments

Comments

@seijikohara
Copy link

Version

3.4.0

Environment info

Environment Info:

  System:
    OS: macOS 10.14.2
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  Binaries:
    Node: 11.9.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.7.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 71.0.3578.98
    Firefox: 64.0
    Safari: 12.0.2
  npmPackages:
    @vue/cli:  3.4.0
  npmGlobalPackages:
    @vue/cli: 3.4.0

Steps to reproduce

vue ui command does not start with an error.

$ vue ui
internal/modules/cjs/loader.js:611
    throw err;
    ^

Error: Cannot find module 'core-js/proposals/array-flat-and-flat-map'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)
    at Function.Module._load (internal/modules/cjs/loader.js:535:25)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@vue/cli/node_modules/apollo-env/lib/polyfills/array.js:3:1)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)

What is expected?

vue ui will start without errors.

What is actually happening?

Necessary modules are missing.

@larsmars
Copy link

larsmars commented Feb 2, 2019

I have the same, just updated vue cli.

vue --version = 3.4.0
macOS Mojave 10.14.2
node v10.14.1
yarn 1.5.1
npm 6.7.0

@mnewt00
Copy link

mnewt00 commented Feb 2, 2019

Yeah I have the same error as well, trying to find a fix

@Kerbores
Copy link

Kerbores commented Feb 2, 2019

me too

@Kerbores
Copy link

Kerbores commented Feb 2, 2019

~ vue -V
3.4.0
➜ ~ npm -v
6.4.1
➜ ~ node -v
v10.15.1
➜ ~ vue ui
internal/modules/cjs/loader.js:583
throw err;
^

Error: Cannot find module 'core-js/proposals/array-flat-and-flat-map'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/usr/local/lib/node_modules/@vue/cli/node_modules/apollo-env/lib/polyfills/array.js:3:1)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)

@iAn-Pinto
Copy link

me too, same error:

vue --version is 3.4.0
macOS Mojave 10.14.1 (18B75)
node --version is v11.9.0
npm --version is 6.5.0

vue ui

internal/modules/cjs/loader.js:583
throw err;
^

Error: Cannot find module 'core-js/proposals/array-flat-and-flat-map'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/usr/local/lib/node_modules/@vue/cli/node_modules/apollo-env/lib/polyfills/array.js:3:1)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)

@sadeghbarati
Copy link

sadeghbarati commented Feb 2, 2019

+1

reinstall every thing like vue-cli node core-js but still have problem

remove npm and npm-cache

remove node_module in user/AppData/Roaming and reinstall every thing and still have problem

node v10.15.1
npm v6.4.1
vue v3.4.0

😢 😭

@haoqunjiang
Copy link
Member

It’s a bug in apollo-env

@sadeghbarati
Copy link

@sodatea what should we do ?!

@haoqunjiang
Copy link
Member

They depend on a beta version of core-js without locking its version.
And core-js’s directory structure just got changed due to the release of ES2019 standard.
zloirock/core-js@f9bb4c1

@haoqunjiang
Copy link
Member

@sadeghbarati
Copy link

Let us know when the bug was fixed , thanks 👍

@wangwenyin
Copy link

怎么修复呢?安装3.0低版本的cli?

@wangwenyin
Copy link

wangwenyin commented Feb 2, 2019

you guys can try:npm install -g core-js@3.0.0-beta.11 ,it's work for me!

@mnewt00
Copy link

mnewt00 commented Feb 2, 2019

Wow, thank you so much @wangwenyin it works now

@bellsenawat
Copy link

I try yarn global add core-js@3.0.0-beta.3 and it's work !!!

@dousybox
Copy link

dousybox commented Feb 3, 2019

Seems apollo-env has fixed this problem in apollographql/apollo-tooling#962 (comment)
Try npm i -g @vue/cli reinstall vue cli to update the dependencies, and vue ui work fine

@seijikohara
Copy link
Author

This issue has been resolved. Thanks!

$ npm install -g @vue/cli && vue ui
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
/usr/local/bin/vue -> /usr/local/lib/node_modules/@vue/cli/bin/vue.js
+ @vue/cli@3.4.0
updated 1 package in 4.664s
🚀  Starting GUI...
🌠  Ready on http://localhost:8000

@MCYouks
Copy link

MCYouks commented Jun 9, 2020

After trying all the different solutions proposed above, it seems that removing the node_modules and then running npm build worked for me!

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

No branches or pull requests