npm old project doesnt install - node.js

I want to run a project written with an older version of npm in 2019. In the user manual its written that I have to run "npm insall" to install the project, but I have the new version npm 8.3.1 installed with new node version 16 and it has many errors. I tried to downgrade my npm to v4 or v3 but after when I want to install I have error:
npm ERR! Windows_NT 10.0.19044
npm ERR! argv "C:\programs\node.exe" "C:\Users\AndiaFathi\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v16.14.0
npm ERR! npm v3.10.10
npm ERR! cb.apply is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\wamp64\www\vocsensuimanager\npm-debug.log```
I tried to solve this error by deleting the npm and cash-npm in C:\Users\AndiaFathi\AppData\Roaming and force cleaning the cash but It will take back the npm version to 8.3.1 and again the same problem. I have also tried to find an older version of node to come directly with an older version of npm but I couldnt find the installer file. Can you pleas tell me what am I doing wrong?

Related

why is npm giving me weird errors?

Hi I am really new to learn redux.
I was keep trying install redux in VSC.
So I typed command "npm init" first. And then I typed "npm i redux".
As a result I got those error messages.
Here is the Error
npm ERR! Linux 5.8.0-63-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "redux"
npm ERR! node v14.17.0
npm ERR! npm v3.10.10
npm ERR! cb.apply is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/garamsong/portfolio/practice_redux/redux_first/npm-debug.log
I checked my node version and npm version as well
node is v14.17.0
npm is v3.10.10
I thought It could be my npm version problem, so I tried delete npm.. but it didn't work..
so my question is
is it version of npm problem?
if not, what is the problem?
and how to install redux?
Thanks for reading my stupid question.. but this made me really frustrated..(btw sudo doesn't work at all) 😥

electron install error : Failed at the electron#1.4.6 postinstall script 'node install.js'

I'm trying to install electron recent version and encountering this error. I tried installing sudo and did downgrade to electron 1.4.5 but this error persists. node version I'm using is v7.1.0
Complete error log
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node/6.6.0/bin/node" "/usr/local/bin/npm" "install" "-g" "electron#1.4.5" "--verbose"
npm ERR! node v6.6.0
npm ERR! npm v3.10.7
npm ERR! code ELIFECYCLE
npm ERR! electron#1.4.5 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron#1.4.5 postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.
It turned out to be a problem with the node version I'm using. Possibly electron is not compatible with the newer version of node that is released.
I've installed nvm and installed a lower version of node. In my case v6.3.0. After that I was able to install electron without errors.
had the same issue, also when using sudo.
when i switched to root, the installation worked.

npm install - Error: No compatible version found: cherrio#'^0.17.0' - manual install then loop of package install

I'm trying to get into a legacy program, which doesn't have any other developers remaining that worked on it over a year ago.
The readme says to install via npm install. When I ran that, it complained about the version of node and suggested node 0.8.x. Based on that I used nvm install 0.8.9 then did nvm use 0.8.9.
When I run npm install, I now get:
npm ERR! Error: No compatible version found: cheerio#'^0.17.0'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.0.3","0.0.4","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1","0.3.2","0.4.0","0.4.1","0.4.2","0.5.0","0.5.1","0.5.2","0.6.0","0.6.1","0.6.2","0.7.0","0.8.0","0.8.1","0.8.2","0.8.3","0.9.0","0.9.1","0.9.2","0.10.0","0.10.1","0.10.2","0.10.3","0.10.4","0.10.5","0.10.6","0.10.7","0.10.8","0.11.0","0.12.0","0.12.1","0.12.2","0.12.3","0.12.4","0.13.0","0.13.1","0.14.0","0.15.0","0.16.0","0.17.0","0.18.0","0.19.0","0.20.0"]
npm ERR! at installTargetsError (~/.nvm/v0.8.9/lib/node_modules/npm/lib/cache.js:553:10)
npm ERR! at ~/.nvm/v0.8.9/lib/node_modules/npm/lib/cache.js:477:15
npm ERR! at saved (~/.nvm/v0.8.9/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR! at ~/.nvm/v0.8.9/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:220:7
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Darwin 14.5.0
npm ERR! command "~/.nvm/v0.8.9/bin/node" "~/.nvm/v0.8.9/bin/npm" "install"
npm ERR! cwd ~/workspace/path/to/project
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
What bothers me is the fact that it references ^0.17.0 and from reading, it sounds like that should support any 0.x.y version that is 0.17.0 or greater. Since 0.17.0, 0.18.0, 0.19.0 and 0.20.0 are in the list, I would assume that things should be just peachy.
If I do node install cheerio#0.17.0 then it seems to work, I then do another npm install and get a new package error like the above, I then manually do the version and it seems to loop back to the cheerio package.
Thoughts on what I'm missing?
Did you get '^0.17.0' from json? To work in cmd just remove apostrophe's.
npm install cheerio#^0.17.0

Node 6 debugger windows - Error trying to copy the OSX app icon to customize electron-prebuilt

I just updated to Node v6 (installed latest win executable from their website), and apparently I can't see to use the "debugger" anymore in my projects
Error: Cannot find module 'C:\Dev\myNodeProject\debugger'
I tried to install this package but then I run into errors
npm install debugger --save
electron-prebuilt#1.0.2 postinstall C:\Dev\myNodeProject\node_modules\electron-prebuilt
> node install.js
Downloading electron-v1.0.2-win32-x64.zip
[============================================>] 100.0% of 49.69 MB (407.27 kB/s)
> debugger#0.35.0 postinstall C:\Dev\myNodeProject\node_modules\debugger
> node bin/postinstall.js
Error trying to copy the OSX app icon to customize electron-prebuilt
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "debugger" "--save"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! debugger#0.35.0 postinstall: `node bin/postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the debugger#0.35.0 postinstall script 'node bin/postinstall.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the debugger package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node bin/postinstall.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs debugger
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls debugger
npm ERR! There is likely additional logging output above.
So is this really a bug that I should report, or am I missing something trivial ? The error mentions OSX but obviously I'm not running that...
I was having similar issues with node v7.8.0 and npm '4.2.0' on Fedora-21.
Investigated around an hour to get the clue to resolving the issue but didn't help much.
However, I come across a module node-inspect which perfectly works for me and serves the purpose I'm looking for.
npm install node-inspect
And then use it like
node inspect my-script.js
For more detail you can refer npm official sites

Cannot install node packages using npm

While installing any node package using npm, I am getting the following error:
C:\Users\460785>npm install express -g npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "express"
"-g" npm ERR! node v6.2.1 npm ERR! npm v3.9.3 npm ERR! code
MODULE_NOT_FOUND
npm ERR! Cannot find module 'github-url-from-git' npm ERR! npm ERR! If
you need help, you may report this error at: npm ERR!
https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\460785\npm-debug.log
I have tried to reinstall node.js again and again, one with stable version and also the latest version. Still, I am getting the same error.
It seems like multiple persons on github had a similiar problem.
As the user GregWoods stated there you might want to uninstall node.js completly and delete all remaining files in your Program Files Folder and then install again.

Resources