Storybook: La compilación del libro de cuentos falla en el nodo 13 (no se puede encontrar el módulo @ babel / compat-data / corejs3-ship-proposiciones)

Creado en 20 abr. 2020  ·  22Comentarios  ·  Fuente: storybookjs/storybook

Describe el error
Storybook se compila bien en el nodo 12 (la última versión de LTS) pero falla en el nodo 13 (la última versión actual) con el error cannot find module @babel/compat-data/corejs3-shipped-proposals .

Reproducir
Cree un proyecto de React Storybook con el nodo 13.

Registros
Aquí están los registros de compilación completos:

2020-04-20T13:59:34.5474279Z info @storybook/react v5.3.17
2020-04-20T13:59:34.5475745Z info 
2020-04-20T13:59:34.5489934Z info clean outputDir..
2020-04-20T13:59:34.5695422Z info => Copying static files from: public
2020-04-20T13:59:34.5696240Z info => Copying prebuild dll's..
2020-04-20T13:59:34.5733932Z info => Building manager..
2020-04-20T13:59:34.5736917Z info => Loading manager config..
2020-04-20T13:59:34.5754999Z info => Loading presets
2020-04-20T13:59:34.9917905Z info => Loading custom manager config.
2020-04-20T13:59:34.9992102Z info => Compiling manager..
2020-04-20T14:00:01.6660748Z info => manager built (27 s)
2020-04-20T14:00:01.8006707Z info => Building preview..
2020-04-20T14:00:01.8010909Z info => Loading preview config..
2020-04-20T14:00:01.8030982Z info => Loading presets
2020-04-20T14:00:01.9197990Z info => Loading config/preview file in "./.storybook".
2020-04-20T14:00:01.9198265Z info => Adding stories defined in ".storybook/main.js".
2020-04-20T14:00:01.9482105Z info => Loading Webpack configuration from `node_modules/react-scripts`
2020-04-20T14:00:01.9482484Z info => Removing existing JavaScript and TypeScript rules.
2020-04-20T14:00:02.5784558Z info => Modifying Create React App rules.
2020-04-20T14:00:02.5826857Z info => Loading custom Webpack config (full-control mode).
2020-04-20T14:00:02.5835617Z info => Compiling preview..
2020-04-20T14:00:02.6621739Z <s> [webpack.Progress] 0% compiling
<...>
2020-04-20T14:00:35.4316201Z <s> [webpack.Progress] 100% 
2020-04-20T14:00:35.4320218Z 
2020-04-20T14:00:35.4355253Z ERR! => Failed to build the preview
2020-04-20T14:00:35.5169453Z ERR! ./.storybook/generated-entry.js
2020-04-20T14:00:35.5169898Z ERR! Module build failed (from ./node_modules/babel-loader/lib/index.js):
2020-04-20T14:00:35.5170244Z ERR! Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
2020-04-20T14:00:35.5170385Z ERR! Require stack:
2020-04-20T14:00:35.5171142Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
2020-04-20T14:00:35.5171506Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/index.js
2020-04-20T14:00:35.5171872Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/core/lib/config/files/plugins.js
2020-04-20T14:00:35.5172359Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/core/lib/config/files/index.js
2020-04-20T14:00:35.5179674Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/core/lib/index.js
2020-04-20T14:00:35.5180075Z ERR! - /__w/<PROJECT_ROOT>/node_modules/babel-plugin-apply-mdx-type-prop/index.js
2020-04-20T14:00:35.5180430Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@mdx-js/mdx/mdx-hast-to-jsx.js
2020-04-20T14:00:35.5180808Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/dist/mdx/mdx-compiler-plugin.js
2020-04-20T14:00:35.5181604Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/mdx-compiler-plugin.js
2020-04-20T14:00:35.5182865Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/dist/frameworks/common/preset.js
2020-04-20T14:00:35.5183263Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/dist/preset.js
2020-04-20T14:00:35.5183626Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/preset.js
2020-04-20T14:00:35.5183987Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/dist/server/presets.js
2020-04-20T14:00:35.5184349Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/dist/server/config.js
2020-04-20T14:00:35.5184712Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/dist/server/build-static.js
2020-04-20T14:00:35.5185046Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/server.js
2020-04-20T14:00:35.5185402Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/react/dist/server/build.js
2020-04-20T14:00:35.5185750Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/react/bin/build.js
2020-04-20T14:00:35.5185917Z ERR!     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
2020-04-20T14:00:35.5186073Z ERR!     at Function.Module._load (internal/modules/cjs/loader.js:835:27)
2020-04-20T14:00:35.5186219Z ERR!     at Module.require (internal/modules/cjs/loader.js:1012:19)
2020-04-20T14:00:35.5186360Z ERR!     at require (internal/modules/cjs/helpers.js:72:18)
2020-04-20T14:00:35.5186963Z ERR!     at Object.<anonymous> (/__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js:10:55)
2020-04-20T14:00:35.5187131Z ERR!     at Module._compile (internal/modules/cjs/loader.js:1123:30)
2020-04-20T14:00:35.5187278Z ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
2020-04-20T14:00:35.5187422Z ERR!     at Module.load (internal/modules/cjs/loader.js:972:32)
2020-04-20T14:00:35.5187557Z ERR!     at Function.Module._load (internal/modules/cjs/loader.js:872:14)
2020-04-20T14:00:35.5187703Z ERR!     at Module.require (internal/modules/cjs/loader.js:1012:19)
2020-04-20T14:00:35.5187840Z ERR!     at require (internal/modules/cjs/helpers.js:72:18)
2020-04-20T14:00:35.5188221Z ERR!     at Object.<anonymous> (/__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/index.js:29:44)
2020-04-20T14:00:35.5188375Z ERR!     at Module._compile (internal/modules/cjs/loader.js:1123:30)
2020-04-20T14:00:35.5188522Z ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
2020-04-20T14:00:35.5188668Z ERR!     at Module.load (internal/modules/cjs/loader.js:972:32)
2020-04-20T14:00:35.5189084Z ERR!     at Function.Module._load (internal/modules/cjs/loader.js:872:14)
2020-04-20T14:00:35.5189755Z ERR!  @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.tsx ./node_modules/@storybook/addon-knobs/dist/preset/addDecorator.js ./.storybook/generated-entry.js main[6]
2020-04-20T14:00:35.5190062Z ERR! ./.storybook/preview.tsx
2020-04-20T14:00:35.5190378Z ERR! Module build failed (from ./node_modules/babel-loader/lib/index.js):
2020-04-20T14:00:35.5190711Z ERR! Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
2020-04-20T14:00:35.5190848Z ERR! Require stack:
2020-04-20T14:00:35.5191207Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
2020-04-20T14:00:35.5191568Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/index.js
2020-04-20T14:00:35.5191928Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/core/lib/config/files/plugins.js
2020-04-20T14:00:35.5192267Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/core/lib/config/files/index.js
2020-04-20T14:00:35.5192615Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/core/lib/index.js
2020-04-20T14:00:35.5192978Z ERR! - /__w/<PROJECT_ROOT>/node_modules/babel-plugin-apply-mdx-type-prop/index.js
2020-04-20T14:00:35.5193328Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@mdx-js/mdx/mdx-hast-to-jsx.js
2020-04-20T14:00:35.5193700Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/dist/mdx/mdx-compiler-plugin.js
2020-04-20T14:00:35.5194069Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/mdx-compiler-plugin.js
2020-04-20T14:00:35.5194449Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/dist/frameworks/common/preset.js
2020-04-20T14:00:35.5194806Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/dist/preset.js
2020-04-20T14:00:35.5195154Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/preset.js
2020-04-20T14:00:35.5195512Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/dist/server/presets.js
2020-04-20T14:00:35.5195870Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/dist/server/config.js
2020-04-20T14:00:35.5196232Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/dist/server/build-static.js
2020-04-20T14:00:35.5196577Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/server.js
2020-04-20T14:00:35.5196938Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/react/dist/server/build.js
2020-04-20T14:00:35.5197283Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/react/bin/build.js
2020-04-20T14:00:35.5197438Z ERR!     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
2020-04-20T14:00:35.5197590Z ERR!     at Function.Module._load (internal/modules/cjs/loader.js:835:27)
2020-04-20T14:00:35.5197734Z ERR!     at Module.require (internal/modules/cjs/loader.js:1012:19)
2020-04-20T14:00:35.5197870Z ERR!     at require (internal/modules/cjs/helpers.js:72:18)
2020-04-20T14:00:35.5198277Z ERR!     at Object.<anonymous> (/__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js:10:55)
2020-04-20T14:00:35.5198444Z ERR!     at Module._compile (internal/modules/cjs/loader.js:1123:30)
2020-04-20T14:00:35.5198592Z ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
2020-04-20T14:00:35.5198825Z ERR!     at Module.load (internal/modules/cjs/loader.js:972:32)
2020-04-20T14:00:35.5198964Z ERR!     at Function.Module._load (internal/modules/cjs/loader.js:872:14)
2020-04-20T14:00:35.5199104Z ERR!     at Module.require (internal/modules/cjs/loader.js:1012:19)
2020-04-20T14:00:35.5199240Z ERR!     at require (internal/modules/cjs/helpers.js:72:18)
2020-04-20T14:00:35.5199681Z ERR!     at Object.<anonymous> (/__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/index.js:29:44)
2020-04-20T14:00:35.5204630Z ERR!     at Module._compile (internal/modules/cjs/loader.js:1123:30)
2020-04-20T14:00:35.5204809Z ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
2020-04-20T14:00:35.5204955Z ERR!     at Module.load (internal/modules/cjs/loader.js:972:32)
2020-04-20T14:00:35.5205091Z ERR!     at Function.Module._load (internal/modules/cjs/loader.js:872:14)
2020-04-20T14:00:35.5205918Z ERR!  @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.tsx ./node_modules/@storybook/addon-knobs/dist/preset/addDecorator.js ./.storybook/generated-entry.js main[4]
2020-04-20T14:00:35.5206259Z ERR! ./node_modules/acorn-jsx/index.js
2020-04-20T14:00:35.5206569Z ERR! Module build failed (from ./node_modules/babel-loader/lib/index.js):
2020-04-20T14:00:35.5206896Z ERR! Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
2020-04-20T14:00:35.5207037Z ERR! Require stack:
2020-04-20T14:00:35.5207397Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
2020-04-20T14:00:35.5207752Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/index.js
2020-04-20T14:00:35.5208118Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/core/lib/config/files/plugins.js
2020-04-20T14:00:35.5208469Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/core/lib/config/files/index.js
2020-04-20T14:00:35.5208815Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@babel/core/lib/index.js
2020-04-20T14:00:35.5209184Z ERR! - /__w/<PROJECT_ROOT>/node_modules/babel-plugin-apply-mdx-type-prop/index.js
2020-04-20T14:00:35.5209518Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@mdx-js/mdx/mdx-hast-to-jsx.js
2020-04-20T14:00:35.5209889Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/dist/mdx/mdx-compiler-plugin.js
2020-04-20T14:00:35.5210258Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/mdx-compiler-plugin.js
2020-04-20T14:00:35.5210632Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/dist/frameworks/common/preset.js
2020-04-20T14:00:35.5210996Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/dist/preset.js
2020-04-20T14:00:35.5212105Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/addon-docs/preset.js
2020-04-20T14:00:35.5213149Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/dist/server/presets.js
2020-04-20T14:00:35.5213933Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/dist/server/config.js
2020-04-20T14:00:35.5214316Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/dist/server/build-static.js
2020-04-20T14:00:35.5214658Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/core/server.js
2020-04-20T14:00:35.5215012Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/react/dist/server/build.js
2020-04-20T14:00:35.5215599Z ERR! - /__w/<PROJECT_ROOT>/node_modules/@storybook/react/bin/build.js
2020-04-20T14:00:35.5215757Z ERR!     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
2020-04-20T14:00:35.5215905Z ERR!     at Function.Module._load (internal/modules/cjs/loader.js:835:27)
2020-04-20T14:00:35.5216122Z ERR!     at Module.require (internal/modules/cjs/loader.js:1012:19)
2020-04-20T14:00:35.5216263Z ERR!     at require (internal/modules/cjs/helpers.js:72:18)
2020-04-20T14:00:35.5216678Z ERR!     at Object.<anonymous> (/__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js:10:55)
2020-04-20T14:00:35.5216848Z ERR!     at Module._compile (internal/modules/cjs/loader.js:1123:30)
2020-04-20T14:00:35.5216998Z ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
2020-04-20T14:00:35.5217151Z ERR!     at Module.load (internal/modules/cjs/loader.js:972:32)
2020-04-20T14:00:35.5217294Z ERR!     at Function.Module._load (internal/modules/cjs/loader.js:872:14)
2020-04-20T14:00:35.5217436Z ERR!     at Module.require (internal/modules/cjs/loader.js:1012:19)
2020-04-20T14:00:35.5217576Z ERR!     at require (internal/modules/cjs/helpers.js:72:18)
2020-04-20T14:00:35.5217953Z ERR!     at Object.<anonymous> (/__w/<PROJECT_ROOT>/node_modules/@babel/preset-env/lib/index.js:29:44)
2020-04-20T14:00:35.5218112Z ERR!     at Module._compile (internal/modules/cjs/loader.js:1123:30)
2020-04-20T14:00:35.5218257Z ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
2020-04-20T14:00:35.5218405Z ERR!     at Module.load (internal/modules/cjs/loader.js:972:32)
2020-04-20T14:00:35.5218529Z ERR!     at Function.Module._load (internal/modules/cjs/loader.js:872:14)
2020-04-20T14:00:35.5218884Z ERR!  @ ./node_modules/@storybook/addon-docs/dist/frameworks/react/lib/inspection/acornParser.js 18:39-59
2020-04-20T14:00:35.5219239Z ERR!  @ ./node_modules/@storybook/addon-docs/dist/frameworks/react/lib/inspection/inspectValue.js
2020-04-20T14:00:35.5219580Z ERR!  @ ./node_modules/@storybook/addon-docs/dist/frameworks/react/lib/inspection/index.js
2020-04-20T14:00:35.5219920Z ERR!  @ ./node_modules/@storybook/addon-docs/dist/frameworks/react/propTypes/createType.js
2020-04-20T14:00:35.5220256Z ERR!  @ ./node_modules/@storybook/addon-docs/dist/frameworks/react/propTypes/handleProp.js
2020-04-20T14:00:35.5220592Z ERR!  @ ./node_modules/@storybook/addon-docs/dist/frameworks/react/extractProps.js
2020-04-20T14:00:35.5220910Z ERR!  @ ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js
2020-04-20T14:00:35.5221633Z ERR!  @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.tsx ./node_modules/@storybook/addon-knobs/dist/preset/addDecorator.js ./.storybook/generated-entry.js
2020-04-20T14:00:35.5221851Z (node:163) UnhandledPromiseRejectionWarning: [object Object]
2020-04-20T14:00:35.5222644Z (node:163) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
2020-04-20T14:00:35.5223236Z (node:163) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2020-04-20T14:00:35.5580280Z npm ERR! code ELIFECYCLE
2020-04-20T14:00:35.5585246Z npm ERR! errno 1
2020-04-20T14:00:35.5602967Z npm ERR! [email protected] build-storybook: `npm run generateTypes && build-storybook -s public`
2020-04-20T14:00:35.5603219Z npm ERR! Exit status 1
2020-04-20T14:00:35.5603347Z npm ERR! 
2020-04-20T14:00:35.5603669Z npm ERR! Failed at the [email protected] build-storybook script.
2020-04-20T14:00:35.5603823Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-04-20T14:00:35.5662261Z 
2020-04-20T14:00:35.5664818Z npm ERR! A complete log of this run can be found in:
2020-04-20T14:00:35.5665464Z npm ERR!     /github/home/.npm/_logs/2020-04-20T14_00_35_560Z-debug.log
2020-04-20T14:00:35.5863724Z ##[error]Process completed with exit code 1.

Sistema:

Probamos los siguientes sistemas:

CI (acciones de GitHub):
SO: Ubuntu 18.04.4
Nodo: 13.13.0 (❌ falla)
Libro de cuentos (Reaccionar): 5.3.17

Local (Windows):
Sistema operativo: Windows 10 Pro 1909
Nodo: 10.16.3 (✔️ tiene éxito), 12.16.2 (✔️ tiene éxito), 13.13.0 (❌ falla)
Libro de cuentos (Reaccionar): 5.3.17

bug compatibility with other tools has workaround

Comentario más útil

Me ayudó a eliminar node_modules y yarn.lock y usar el nodo 13.13.

Todos 22 comentarios

cc @ndelangen

Encontré el mismo problema al intentar construir marktext y también funciona bien con el Nodo 12.16.2. Supongo que es un error aguas arriba.

¿Hay algún problema aguas arriba que podamos rastrear?

No encontré un problema relacionado en github / babel-loader. Intenté sin éxito construir con babel-loader 8.1.0 (más reciente). Se crearía si alguien con más experiencia con estas herramientas abriera una.

npm update resolvió este problema por mí. Supongo que el problema está en los paquetes ocultos de CRA

Tuve el mismo mensaje de error con una aplicación laravel y bootstrap-vue.
npm update no ayudó. Pero, lo que hizo fue eliminar la carpeta node_modules y package-lock.json y actualizar el único paquete en package.json, que tenía compat-data como dependencia.
La actualización no fue obvia al principio: eliminé el tercer número en la etiqueta de control de versiones.
Supongo que @ babel / compat-data es compatible con el nodo 13.13 en la versión 7.9.0 pero no en la versión 7.8.6.

@ Sandman83 Por cierto, también tuve que eliminar node_modules y package-lock.json .

Me ayudó a eliminar node_modules y yarn.lock y usar el nodo 13.13.

Tuve este problema hoy, eliminar node_modules y package-lock.json funcionó para mí.

Eliminé node_modules como dijo @mckrava y usé NodeJS v12 y funcionó.

Este error me apareció cuando ejecuté yarn serve en mi aplicación Vue.
Gracias a @mckrava , eliminar node_modules y yarn.lock y ejecutar yarn ayudó.

En mi caso, actualizar @babel/preset-env de ^7.8.7 a ^7.9.0 ayudó ♥ ️

Prueba npm update

Si esto no funciona, intente actualizar lo siguiente, elimine el directorio node_modules y ejecute npm install

"@babel/core": "^7.7.2 a @babel/core": "^7.9.0"
"@babel/preset-env": "^7.7.1 a @babel/preset-env": "^7.9.5"

Espero que esto funcione

En mi caso, actualizar @babel/preset-env de ^7.8.7 a ^7.9.0 ayudó ♥ ️

¿Cómo averiguaste esto amigo? Finalmente me ayudó muchas gracias

Tuve este problema hoy, eliminar node_modules y package-lock.json funcionó para mí.

¡Gracias, funciona para mí!

En mi caso, actualizar @babel/preset-env de ^7.8.7 a ^7.9.0 ayudó ♥ ️

muchas gracias señor, funciona para mí

Encontré ese error cuando el nodo subió de 12.16.1 a 12.17.0

Solucioné mi problema eliminando las 2 entradas de @babel/compat-data en yarn.lock y lanzando un yarn para deduplicar.

Dado que hasta ahora solo se mencionaron soluciones, pero no se mencionaron razones (me preguntaba cuál es la solución correcta debido a esto), pensé que debería señalarlo.

Este problema lleva al hecho de que babel se basó en el comportamiento del nodo que en realidad era un error . Luego, ese error se solucionó en Node y el paquete babel comenzó a mostrar este problema. Por lo tanto, recomendaría actualizar @babel/preset-env a 7.9.0 y consultar el PR en el repositorio de babel en lugar de este problema aquí.

También encontré este problema. Es inútil eliminar node_modules. Tengo que eliminar el archivo package-lock.json.

Última solución:

yarn add @babel/preset-env -D 

¡La prueba profesional es efectiva! ! !

En mi caso, la actualización de @ babel / preset-env de ^ 7.11.5 ayudó

¿Fue útil esta página
0 / 5 - 0 calificaciones