I have been on this and unable to solve it for over a day.
I don't know what is causing the error(s) but everytime I try to do anything with npm I get error messages.
2 days ago, I noticed my browser was not autorefreshing when I made changes to the code.
ChatGPT suggested to uninstall node and npm and reinstall, which I have done about 10 times.
The errors started after the first time I reinstalled node.js
I then chose to use nvm installer for windows, which worked, but I am still getting errors anytime I try to run anything.
I end up going in circles with gpt everytime trying to solve it.
I am using node version 18.16.0 and npm version 9.5.1
If I open vscode and open a fresh folder in it (add an index.html and script.js)
then run either npm init -y or npm i, i get a host of errors everytime, preventing me from creating the node_modules folder.
it does sometimes create a package.json or package.json locked folder, but I am sure there are probably issues with them.
The errors I get include:
Exception has occurred: Error: ENOENT: no such file or directory, /projectName/git.COM
Exception has occurred: TypeError: Invalid SemVer Range: latest at new Range (this one occurs alot)
Exception has occurred: Error: ENOENT: no such file or directory, open ...current-project\node_modules\acorn\package.json'
Exception has occurred: Error: ENOENT: no such file or directory, "... AppData\Local\npm-cache\_cacache\content-v2\sha512\31\77
Sometimes when running npm i, I will get non stop errors and different errors if I just keep hitting continue in the debugger.
This indicates to me that there is something fundamentally wrong somewhere, (the installation, the ide)
Besides trying to reinstall vscode (which I don't want to do as I have many extensions and configs etc.. installed)
I don't know what to do. This did not happen before when I first installed node.js when starting out around a month ago.
I apologize if I have left some critical details out here, please let me know if / what more I can provide to help.
I'd really appreciate some help here. I am starting a course today and don't want to be left behind.
Thank you.
I don't know what is causing the error(s) but everytime I try to do anything with npm I get error messages.
2 days ago, I noticed my browser was not autorefreshing when I made changes to the code.
ChatGPT suggested to uninstall node and npm and reinstall, which I have done about 10 times.
The errors started after the first time I reinstalled node.js
I then chose to use nvm installer for windows, which worked, but I am still getting errors anytime I try to run anything.
I end up going in circles with gpt everytime trying to solve it.
I am using node version 18.16.0 and npm version 9.5.1
If I open vscode and open a fresh folder in it (add an index.html and script.js)
then run either npm init -y or npm i, i get a host of errors everytime, preventing me from creating the node_modules folder.
it does sometimes create a package.json or package.json locked folder, but I am sure there are probably issues with them.
The errors I get include:
Exception has occurred: Error: ENOENT: no such file or directory, /projectName/git.COM
Exception has occurred: TypeError: Invalid SemVer Range: latest at new Range (this one occurs alot)
Exception has occurred: Error: ENOENT: no such file or directory, open ...current-project\node_modules\acorn\package.json'
Exception has occurred: Error: ENOENT: no such file or directory, "... AppData\Local\npm-cache\_cacache\content-v2\sha512\31\77
Sometimes when running npm i, I will get non stop errors and different errors if I just keep hitting continue in the debugger.
This indicates to me that there is something fundamentally wrong somewhere, (the installation, the ide)
Besides trying to reinstall vscode (which I don't want to do as I have many extensions and configs etc.. installed)
I don't know what to do. This did not happen before when I first installed node.js when starting out around a month ago.
I apologize if I have left some critical details out here, please let me know if / what more I can provide to help.
I'd really appreciate some help here. I am starting a course today and don't want to be left behind.
Thank you.