Search code examples
javascriptreactjscreate-react-app

When creating react app this error appears: Cannot find module './lib/pack.js'


I execute the command:

npx create-react-app opencord

After doing so this error shows up:

Error message in console

What can I do?


Solution

  • I have resolved this problem o Linux by deleting the npm cache folder /home/<user>/.npm/.

    You might be able to resolve this on Windows by deleting the folder C:\Users\<user>\AppData\npm-cache\.

    Apparently you can reach the same result by running the command npm cache clean as well. (You might need to use --force flag)