0

I was writing JavaScript code (just plain 'ol web servers because I am a noobie dev) and I got the above error (Refer to title) and I tried every old way I remembered (as I faced the error in the past) but did it work? Nein. And it came to the point where I am now asking this on Stack Overflow, so uh yeah help

What I tried:

I tried like re-opening the file and stuff similar (It resolved the issue for me in the past), I don't even know if this is detailed enough tbh

judah
  • 3
  • 4
  • You mentioned it write this is not detailed enough. You have to mention what exactly you want to achieve and how you have written your code. Do you want to use the local module as a npm package dependencies or anything else? here is the link if you want to do the same: https://stackoverflow.com/questions/15806241/how-to-specify-local-modules-as-npm-package-dependencies – Rahul Kumawat Mar 31 '23 at 11:55
  • Sorry I don't really know how to explain it, But my question is resolved now. – judah Mar 31 '23 at 12:06
  • Cool then, happy hacking – Rahul Kumawat Mar 31 '23 at 12:08

1 Answers1

0

Please follow following Steps:

  • Delete the node modules folder by running rm -rf node_modules
  • Delete package.lock.json file by running rm -f package-lock.json
  • Clean up the NPM cache by running npm cache clean --force
  • Install all packages again by running npm install
Vivek Pakmode
  • 1,016
  • 2
  • 10
  • 22