score:0

you can find here more precise answer: https://stackoverflow.com/a/68531196/13282460

quote 👇

"1. better solution.

check if your strapi project is nested within another project that uses babel/webpack. i had some old files in my directory with all my projects. when i removed them, it works.

2. workaround solution (with every packages update, it will be back to an earlier version)

  1. in your strapi folder, go to → node_modules/strapi-admin/webpack.config.js
  2. locate the line → require.resolve('@babel/preset-env')
  3. replace it with [require.resolve('@babel/preset-env'),{ targets: 'defaults' }],
  4. run the command - npm run dev"

score:1

finally, i managed to resolve the issue. you need to update the webpack.config.js from

require.resolve('@babel/preset-env')

to

[require.resolve('@babel/preset-env'),{ targets: "defaults" }]

inside the module options


Related Query

More Query from same tag