36

I am trying to create a new react application. I have node version 14.15.3 and npm version 6.14

Error: Cannot find module 'caniuse-lite/dist/unpacker/agents'

when running npx create-react-app

issue screenshot

mikemaccana
  • 110,530
  • 99
  • 389
  • 494
Charan Brijesh
  • 361
  • 1
  • 3
  • 3

4 Answers4

62

I ran into this issue while working on a Vue project and I fixed it by installing the caniuse-lite package again.

Just run npm i caniuse-lite in your terminal.

Then spin up your app again after the installation.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Willower
  • 1,099
  • 8
  • 22
4
npm update @babel/preset-env 

Works for me.

Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
Sinji Yang
  • 89
  • 2
2

I had a similar problem earlier. I installed a previous version of caniuse-lite npm i caniuse-lite@1.0.30001281 worked for Next-js app.

0

Had a very similar issue: npm i caniuse-lite fixed it.

error: index.js: Cannot find module '../lib/supported' Require stack:

  • ..\node_modules\caniuse-lite\dist\unpacker\feature.js
  • ..\node_modules\browserslist\node.js
Harsh Patel
  • 6,334
  • 10
  • 40
  • 73
Sam
  • 1