Descreva o bug
Storybook constrói bem no Nó 12 (a versão LTS mais recente), mas falha no Nó 13 (a versão atual mais recente) com o erro cannot find module @babel/compat-data/corejs3-shipped-proposals
.
Reproduzir
Construa um projeto React Storybook com o Nó 13.
Histórico
Aqui estão os logs de compilação 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:
Tentamos os seguintes sistemas:
CI (Ações GitHub):
SO: Ubuntu 18.04.4
Nó: 13.13.0 (❌ falha)
Storybook (React): 5.3.17
Local (Windows):
SO: Windows 10 Pro 1909
Nó: 10.16.3 (✔️ bem-sucedido), 12.16.2 (✔️ bem-sucedido), 13.13.0 (❌ falha)
Storybook (React): 5.3.17
cc @ndelangen
Eu encontrei o mesmo problema ao tentar construir o texto da marca e ele também funciona bem com o Nó 12.16.2. Suponho que seja um bug do upstream.
Existe um problema no upstream que podemos rastrear?
Não encontrei um problema relacionado em github / babel-loader. Tentei sem sucesso construir com o babel-loader 8.1.0 (mais recente). Seria criado se alguém com mais experiência com essas ferramentas abrisse um.
npm update
resolveu este problema para mim. Presumo que o problema esteja em pacotes ocultos CRA
Eu tive a mesma mensagem de erro com um aplicativo laravel & bootstrap-vue.
npm update
não ajudou. Mas, o que fez foi deletar a pasta node_modules & package-lock.json e atualizar o único pacote em package.json, que tinha compat-data como dependência.
A atualização não era óbvia no início: removi o terceiro número da tag de controle de versão.
Presumo que @ babel / compat-data seja compatível com o nó 13.13 na versão 7.9.0, mas não na versão 7.8.6.
@ Sandman83 A propósito, também tive que deletar node_modules
e package-lock.json
.
Remover node_modules
e yarn.lock
e usar o nó 13.13 foi ajudado para mim.
Tive esse problema hoje, remover node_modules e package-lock.json funcionou para mim.
Removi node_modules
como @mckrava disse e usei o NodeJS v12 e funcionou.
Este erro apareceu para mim quando executei yarn serve
no meu aplicativo Vue.
Graças a @mckrava , remover node_modules
e yarn.lock
e executar yarn
ajudou.
No meu caso, atualizar @babel/preset-env
de ^7.8.7
para ^7.9.0
ajudou ♥ ️
Experimente npm update
Se isso não funcionar, tente atualizar o seguinte, exclua o diretório node_modules
e execute 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 funcione
No meu caso, atualizar
@babel/preset-env
de^7.8.7
para^7.9.0
ajudou ♥ ️
como você descobriu isso cara, finalmente me ajudou muito, obrigado
Tive esse problema hoje, remover node_modules e package-lock.json funcionou para mim.
Obrigado, funciona para mim!
No meu caso, atualizar
@babel/preset-env
de^7.8.7
para^7.9.0
ajudou ♥ ️
muito obrigado senhor, funciona para mim
Eu encontrei esse erro quando o nó subiu de 12.16.1 para 12.17.0
Resolvi meu problema removendo as 2 entradas de @babel/compat-data
em yarn.lock
e lançando yarn
para desduplicar.
Uma vez que apenas soluções, mas nenhum motivo foram mencionados aqui até agora (eu estava me perguntando qual solução é a certa por causa disso), pensei que deveria apontá-la.
Esse problema leva ao fato de que o babel dependia do comportamento do nó que, na verdade, era um bug . Então esse bug foi corrigido no Node e o pacote babel começou a exibir esse problema. E então eu recomendaria atualizar @babel/preset-env
para 7.9.0
e consultar o PR no repositório babel em vez deste problema aqui.
Eu também encontrei esse problema. É inútil excluir node_modules. Eu tenho que excluir o arquivo package-lock.json.
yarn add @babel/preset-env -D
No meu caso, atualizar @ babel / preset-env de ^ 7.11.5 ajudou
Comentários muito úteis
Remover
node_modules
eyarn.lock
e usar o nó 13.13 foi ajudado para mim.