bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.77k stars 1.32k forks source link

Cannot find module '@babel/compat-data/corejs3-shipped-proposals' #206

Closed patvdleer closed 1 month ago

patvdleer commented 4 years ago
patrick@patrick-X470-AORUS-ULTRA-GAMING:~/tmp/my-new-project$ yarn dev
yarn run v1.22.4
$ vue-cli-service serve
 INFO  Starting development server...
98% after emitting SizeLimitsPlugin
 ERROR  Failed to compile with 1 errors                                                                                           1:18:12 PM
 error  in ./src/main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /home/patrick/tmp/my-new-project/src/main.js: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
Require stack:
- /home/patrick/tmp/my-new-project/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
- /home/patrick/tmp/my-new-project/node_modules/@babel/preset-env/lib/index.js
- /home/patrick/tmp/my-new-project/node_modules/@vue/babel-preset-app/index.js
- /home/patrick/tmp/my-new-project/node_modules/@vue/cli-plugin-babel/preset.js
- /home/patrick/tmp/my-new-project/node_modules/@babel/core/lib/config/files/plugins.js
- /home/patrick/tmp/my-new-project/node_modules/@babel/core/lib/config/files/index.js
- /home/patrick/tmp/my-new-project/node_modules/@babel/core/lib/index.js
- /home/patrick/tmp/my-new-project/node_modules/@vue/cli-plugin-babel/index.js
- /home/patrick/tmp/my-new-project/node_modules/@vue/cli-service/lib/Service.js
- /home/patrick/tmp/my-new-project/node_modules/@vue/cli-service/bin/vue-cli-service.js (While processing: "/home/patrick/tmp/my-new-project/node_modules/@vue/cli-plugin-babel/preset.js")
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/home/patrick/tmp/my-new-project/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js:10:55)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/home/patrick/tmp/my-new-project/node_modules/@babel/preset-env/lib/index.js:29:44)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
 @ multi (webpack)-dev-server/client?http://192.168.178.70:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

versions:

patrick@patrick-X470-AORUS-ULTRA-GAMING:~/tmp/my-new-project$ nvm version
v14.5.0
patrick@patrick-X470-AORUS-ULTRA-GAMING:~/tmp/my-new-project$ yarn versions
yarn versions v1.22.4
{
  yarn: '1.22.4',
  frontend: '0.0.0',
  node: '14.5.0',
  v8: '8.3.110.9-node.23',
  uv: '1.38.0',
  zlib: '1.2.11',
  brotli: '1.0.7',
  ares: '1.16.0',
  modules: '83',
  nghttp2: '1.41.0',
  napi: '6',
  llhttp: '2.0.4',
  openssl: '1.1.1g',
  cldr: '37.0',
  icu: '67.1',
  tz: '2020a',
  unicode: '13.0'
}
Done in 0.04s.

I did the following:

git clone https://github.com/chrisvfritz/vue-enterprise-boilerplate.git my-new-project
cd my-new-project
yarn 
yarn dev
patvdleer commented 4 years ago

these issues seem to be caused on 14, if I downgrade to 12 I get the same but if I go to 10 and then to 12 it does work

albert0815 commented 3 years ago

Suffering from the same issue. Also happens with node 12.18.2 (LTS).

mlb5000 commented 3 years ago

I am also having this issue. Were you able to resolve it without downgrading Node @patvdleer?

LowSociety commented 3 years ago

The problem seems to stem from the @vue/cli-plugin-babel library. Go ahead and run yarn upgrade @vue/cli-plugin-babel – solved it for me.

janlueders commented 3 years ago

The problem seems to stem from the @vue/cli-plugin-babel library. Go ahead and run yarn upgrade @vue/cli-plugin-babel – solved it for me.

Thanks a lot!! Worked for me too

reilg commented 2 years ago

The problem seems to stem from the @vue/cli-plugin-babel library. Go ahead and run yarn upgrade @vue/cli-plugin-babel – solved it for me.

This doesn't work for me. I get another error

ERROR  Failed to compile with 3 errors                                                                                                                     11:29:53 PM

This dependency was not found:

* core-js/modules/es.error.cause.js in ./node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js, ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js and 1 other

To install it, you can run: npm install --save core-js/modules/es.error.cause.js

Then yarn couldn't find the package

$ yarn add core-js/modules/es.error.cause.js
yarn add v1.22.17
[1/5] Validating package.json...
[2/5] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/core-js%2fmodules/es.error.cause.js: Request \"https://registry.yarnpkg.com/core-js%2fmodules/es.error.cause.js\" returned a 405".
info If you think this is a bug, please open a bug report with the information provided in "/home/user/projects/enterprise-boilerplate/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Tried with NodeJS 14.19.0 and 16.15.0 on an Ubuntu 20.04 machine. Yarn version 1.22.17.

I really just wanted to test this out and followed the first few steps indicated in the readme.

  1. clone repo
  2. yarn (install)
  3. node _start.js (and rm _start.js)
  4. yarn dev
AhmadOf commented 2 years ago

@reilg I got same as your issue today and was able to fix it by just upgrading core-js version to 3.22.0