3.4.0
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
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)
vue ui
will start without errors.
Necessary modules are missing.
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
Yeah I have the same error as well, trying to find a fix
me too
~ 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.
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)
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.
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)
+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
😢 😭
It’s a bug in apollo-env
@sodatea what should we do ?!
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.
https://github.com/zloirock/core-js/commit/f9bb4c1b0c23a09374dac93527f3cda0bbbc16b2
Let us know when the bug was fixed , thanks 👍
怎么修复呢?安装3.0低版本的cli?
you guys can try:npm install -g [email protected] ,it's work for me!
Wow, thank you so much @wangwenyin it works now
I try yarn global add [email protected]
and it's work !!!
Seems apollo-env has fixed this problem in https://github.com/apollographql/apollo-tooling/issues/962#issuecomment-460015427
Try npm i -g @vue/cli
reinstall vue cli
to update the dependencies, and vue ui
work fine
This issue has been resolved. Thanks!
$ npm install -g @vue/cli && vue ui
npm WARN deprecated [email protected]: 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/[email protected]
updated 1 package in 4.664s
🚀 Starting GUI...
🌠 Ready on http://localhost:8000
After trying all the different solutions proposed above, it seems that removing the node_modules
and then running npm build
worked for me!
Most helpful comment
you guys can try:npm install -g [email protected] ,it's work for me!