https://nuxtjs.org/guide/installation
npx create-nuxt-app first-nuxt
? Project name first-nuxt
? Project description My fantastic Nuxt.js project
? Use a custom server framework none
? Choose features to install Linter / Formatter, Prettier, Axios
? Use a custom UI framework tailwind
? Use a custom test framework jest
? Choose rendering mode Universal
? Author name My Name
? Choose a package manager npm
cd first-nuxt && npm run dev
New application opens without errors
ERROR in ./.nuxt/client.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/.../Projects/training/first-nuxt/.nuxt/client.js: Cannot find module '@babel/preset-env/data/built-ins.json' (While processing: "/Users/.../Projects/training/first-nuxt/node_modules/@nuxt/babel-preset-app/src/index.js")
I'm having the same issue. It can be reproduced with a very minimal setup, just a package.json:
{
"dependencies": {
"nuxt": "latest"
},
"scripts": {
"dev": "nuxt"
}
}
and npm run dev.
I don't think the problem is in nuxt itself though, it occurs in any previous version.
As far as I can tell, it seems to be a problem with @babel/preset-env - data/built-ins.json is missing. It got removed in this commit and v7.4.0 of @babel/preset-env (which was realeased... 2 hours ago?).
Edit
@nuxt/babel-preset-app requires @babel/preset-env/data/built-ins.json directly
Same problem here. Manually changing the line in @nuxt/babel-preset-app/src/index.js to use built-in-modules.json instead of built-ins.json seems to fix this problem.
However, if you do this you run into the next problem: isPluginRequired is no longer exported from babel-preset-env. There is already an open issue in the babel repository to fix this: https://github.com/babel/babel/issues/9707
The only workaround I found until this gets fixed is manually running npm i @babel/[email protected] after creating the nuxt app. Afterwards, everything works as expected.
Still getting the same isPluginRequired error even if i downgrade the @babel/preset-env to 7.3.4. Any ideas?
For me npm i @babel/[email protected] fixed the problem.
Duplicate of #5286
Most helpful comment
Same problem here. Manually changing the line in
@nuxt/babel-preset-app/src/index.jsto usebuilt-in-modules.jsoninstead ofbuilt-ins.jsonseems to fix this problem.However, if you do this you run into the next problem:
isPluginRequiredis no longer exported frombabel-preset-env.There is already an open issue in the babel repository to fix this: https://github.com/babel/babel/issues/9707The only workaround I found until this gets fixed is manually running
npm i @babel/[email protected]after creating the nuxt app. Afterwards, everything works as expected.