Reputation: 11
After creating a nextjs app, I tried running npm run dev and got this error:
error ../../node_modules/buffer/index.js:11:0
Module not found: Can't resolve 'base64-js'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/next/dist/compiled/util/util.js
./node_modules/next/dist/compiled/micromatch/index.js
./node_modules/next/dist/shared/lib/match-remote-pattern.js
./node_modules/next/dist/shared/lib/image-loader.js
./node_modules/next/dist/client/image-component.js
I have tried installing, reinstalling and updating node, npm, next and also tried installing the base64-js module. I also tried to trace the error to the file mentioned in the error, but was not able to find anything.
Please let me know if anyone has a solution
Upvotes: 1
Views: 829
Reputation: 861
Try these steps
Upvotes: 0