while trying to install node dependency(npm install) error Am using node version v4.4.0
It looks like you're using an older version of npm. You might want to get the latest by running npm install npm.
Contextify actually isn't needed since you're running Node version >4. I suspect that you haven't explicitly included contextify but rather it is being included as a dependency by some other package. Try to figure out what package that is and see if there's a newer version of it that. See here: https://github.com/nodejs/node-gyp/issues/785
Related
npm does not support Node.js v15.5.0 as well as v14.15.3
npm Version: 5.6.0
I upgraded it trough the command: npm i -g npm-upgrade
But I don't get version 6, I always get version 5.6.0
I also tried different Node.js versions according to 426750.
I tried following Node.js versions: v15, v14, v12, v9. It doesn't matter which Node.js version I install, i always get the samme error.
I also removed Node.js and updated it as recommended in 47226238, 63196042.
I have no Idea how I can fix this problem. Do you have any suggestion?
The correct command to update npm is npm install -g npm. At the time of this writing, that will install npm#6.14.10. (If it doesn't, try npm install -g npm#6.)
Installing npm-upgrade instead will install a CLI that updates package.json in projects. It will not update npm itself.
EDIT: The version compatibility stuff is just a warning. Based on the comment below, the ERR! cb.apply is not a function stuff is the real problem. You may have multiple versions of npm or node installed in different paths and your PATH or alias configuration is causing incompatible versions to run with each other.
EDIT (continued): If you are using nvm as a version manager, you can downgrade to a previous version, remove/reinstall the current version of Node.js, and you will have a compatible version of npm. If you are not using nvm, installing it (assuming you are on a development machine and not experiencing these issues in production) and using node and npm provided by it should also solve the issue.
EDIT PART 3: I just noticed you are running Node.js 15.5.0. That ships with npm#7 so do npm install -g npm#7. If that doesn't work, find your executable paths for node and npm. (On UNIX-like operating systems: command -v node and command -v npm.) If they are not in the same directories, that sounds like a problem and you should investigate. It will probably be easiest/best to use the npm that is in the same directory as node. You can try that out by using the full path. If that works, figure out what's wrong with your PATH or your aliases that you're using a different npm and fix that.
When I did npm -v it showed version 7.something.
I just wanted to make sure I have the latest available, so I did npm install -g npm.
It seemed to work OK (it did go through a install/upgrade process) but when I now do npm -v it says 6.14.9.
What is the 'correct' or proper way to get the latest npm on macOS? And I mean in a global way (for my entire coding environment) so that any NodeJS project in any directory will universally use the latest npm.
FYI I'm using macOS Catalina 10.15.6.
npm 7 ships with Node.js 15.x but is not yet the default latest within the npm registry. Confusing! If you want the latest 7.x version of npm, you need to specify that you want version 7: npm install -g npm#7. Otherwise, it will give you the latest 6.x release.
I recommend using nvm to manage your node versions. It allows switching between projects with different versions without running into version issues.
With it, you can use nvm install node to install the latest one, or nvm ls-remote to list available versions for install.
Every time I open a terminal window, I get this (even before typing anything):
ERROR: npm is known not to run on Node.js v4.1.2
Node.js 4 is supported but the specific version you're running has
a bug known to break npm. Please update to at least 4.7.0 to use this
version of npm. You can find the latest release of Node.js at https://nodejs.org/
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `npm config delete prefix` or `nvm use --delete-prefix v4.1.2 --silent` to unset it.
I was never running a version of node 4, but anyway I deleted node.js completely following some pretty thorough steps I found online, and then reinstalled it from the website to version 8.11.2 (node -v gives me v8.11.2) but the warning still appears
I never paid it much attention until my npm started seriously acting up while trying to work with create-react, giving me tons of security warning with npm audit and not letting me update to the indicated versions of modules.
I've tried everything, reinstalling npm, reinstalling node, etc. and I'm worried that it's interfering with my app now.
(nvm maintainer here)
If you can get node working such that nvm current doesn't say "none" or "system", then you can run nvm install-latest-npm to ensure you have the latest version of npm that actually works on your node version.
Separately, node 4.1.2 is EOL - if that's your system version, you may want to uninstall it completely.
If you're still having trouble, please file an issue on http://nvm.sh
I installed Node and npm as they are required to install angular cli.
Now, if I type this command:
npm install -g angular-cli
I get this message in terminal:
ERROR: npm is known not to run on Node.js v4.2.6 Node.js 4 is supported but the specific version you're running has a bug known to break npm. Please update to at least 4.7.0 to use this version of npm. You can find the latest release of Node.js at https://nodejs.org/
I also followed this link, but still the issue is not resolved.
I tried removing node, npm and then reinstalling, updating node according to all the ways I found on internet, but still the version(4.2.6) is same.
I don't understand what I am doing wrong as I am new to Linux.
Surprisingly, npm is quite complicated in Linux, until you discover Node Version Manager which allows you to easily install new versions and swap between them.
After installing nvm, you can install any node version with nvm install <VERSION_NUMBER> and you can set it as default with nvm alias default <VERSION_NUMBER>
You can swap between versions using nvm use <VERSION_NUMBER>
I am trying to install Satellizer.
But getting error.
Can you guide me to understand whats this error is, and how can I fix this.
I have node version v5.1.0 and npm version 3.5.2
Looks like you have the Satellizer as a decency inside your package.json
Or
That the project name is the same of one your depended package(s)
If it not a depended package, there used to be some error with npm v3.5.X so try to update your npm version and then re-install it.
I would also recommend to test it with node v4.X since v5 might contain those kind of bugs