npm install completes but no executable produced - npm-install

When I try to install cordova using "npm install -g cordova", the install process completes noting that 486 packages were added, and no errors reported, but no executable was produced. I tried the same thing on another computer and cordova.exe was produced in user/AppData/Roaming/npm.
I tried installing other programs and likewise, no executable was produced.
I also ran the install in verbose mode, but saw noting unusual.
I am installing from an admin-level cmd prompt on Windows 10.
What am I missing?

A "normal" (non-global) install would be
npm install cordova
You'll find the executable in node_modules/.bin then.

Related

How can I install NODE_MODULE_VERSION 46

How can I install a Node.js version using NODE_MODULE_VERSION 46? I keep running into a NODE_MODULE_VERSION mismatch, and recompiling hasn't helped so switching node versions might be easier.
Basically, I keep coming across this:
Warning: The module '/home/cwaugh/workspaces/myproject/build/Release/addon.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 46. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`). Use --force to continue.
So far, I've tried using n to change to different versions (one of my dependencies requires 4.9.1 or below), but that doesn't seem to change the NODE_MODULE_VERSION as recognized by the warning.
I've also tried recompiling:
I've tried deleting node_modules and running npm install again. (this error looks like it's coming from the project root, but it never worked for anything in the node_modules folder either)
node-gyp configure --target=4.9.1 && node-gyp build --target=4.9.1. I got the idea from here, and hoped I'd have better luck than mxcd.
node-pre-gyp rebuild. I saw this, and thought it might work for me.
This works on another, older computer running a vagrant image. Unfortunately, vagrant isn't working on the new computer either, so I've been trying from scratch. Sometimes, I wonder if it's because I'm using Ubuntu 18.04. The server's can't seem to go past 16.04 when they run our docker image.
I GOT IT!
It turns out I was getting different versions from node and nodejs
$ node --version
v4.9.1
$ nodejs --version
v8.10.0
I upgrade to node v8.10.0, redo everything, and the error's gone!
sudo npm install -g n
sudo n 8.10.0
rm -rf node_modules
npm install
node-gyp clean
node-gyp configure
node-gyp build
grunt build
grunt start
# No more NODE_MODULE_VERSION error
I tried uninstalling nodejs (since this it's been replaced by just "node"), but node-grunt-cli requires it. I'm guessing that grunt uses nodejs instead of node to check its version, causing the error. The Ubuntu repositories have Grunt v0.4.5, while Grunt stable is at v1.0.3, so it's possible a newer version of grunt would also solve this problem.
The solution didn't work for me since I had just one node version (10).
What was happening in my project, was that the package.json was pulled from the remote repository with an old version package.
At the moment of installing node modules locally (using yarn), it would download up-to-date dependencies, creating incompatibility.
After trying several solutions, what finally worked for me was picking the specific package that was giving me headache (login-funcs-nodejs) and run:yarn upgrade login-funcs-nodejs --latest

Cannot get "npm install #feathers/cli -g" to work in the command line

I get this error message when I try installing feathers from npm
npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm WARN deprecated babel-preset-es2015#6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
Help!!
As Vasan pointed out in the comments, running
npm install -g #feathersjs/cli
from the command prompt on Windows installs a file feathers.cmd in the folder:
%APPDATA%\npm
If this folder is not on your PATH, then feathers will not be recognised as an executable - it appears that the global install doesn't add it to the path automatically.
Editing system environment variables to add this folder to your path should make the feathers cli tools available.
Note that after altering your path you may need to restart your terminal for the updated path to be available.
Its very simple, if you have an earlier version installed, uninstall the old feathers-cli using:
npm uninstall feathers-cli -g
Then install #feathersjs/cli and upgrade a project by the following commands:
npm install #feathersjs/cli -g
cd path/to/project
feathers upgrade
I also faced with the installation issue. But got an error: 404 Not Found: babel-messages#^6.23.0. I've solved it when run npm install #feathersjs/cli -g through the windows terminal (cmd). Before that I was running it on bash.
This issue also occurs when installation is ran using Admin credential(Windows 10), reinstall without elevated cmd/powershell credential also solved the problem.

How to stop angular-cli freezing on "loadRequestedDeps: silly install loadAllDepsIntoIdealTree"?

I am running Windows 8.1 with node version 7.7.3 and npm version 4.1.2.
I have been working on an Angular tutorial without issues. At some point since finishing that tutorial I installed Python. I am not sure if it is related, but I have mentioned it just in case.
Today I am trying to create an Angular application and it hung without completing.
I did some research and it tells me to do this:
npm uninstall -g #angluar/cli
npm cache clean
npm install -g #angular/cli
The last command hangs at this point:
loadRequestedDeps: silly install loadAllDepsIntoIdealTree
I opened the command prompt "run as administrator" to run these commands.
Everything I try fails. I have connected to a completely different network to eliminate that as the problem and that didn't fix anything. I have uninstalled and reinstalled node.js and that hasn't fixed the problem either.
I can ping registry.npmjs.org just fine.
What is causing this error?
I finally found the answer! I ran the following command in the command window:
echo %temp%
It had 3 temp paths in there. I removed the two I didn't need and voila, it works!

"Node Commands" printed at prompt when trying to run grunt/ gulp on Windows 7

I've installed nodejs, and have used npm to install grunt using
npm install grunt
When I try to run grunt, I am presented with what appears to be instructions on running node commands: (see image)
the same applies when trying to run gulp
I have done the same steps on other computers, and had no problem running grunt previously
Please suggest ideas as to what's going on.
Thanks
As suggested by Joe Clay, the problem was that there was another app called node.exe whose pathwas in PATH variable before nodejs.
see also:
Nodejs seems to be not working; npm do work, however

Stuck on installing dependencies with bower (foundation new)

I followed this guide to install foundation on my Windows 8.1 PC.
http://foundation.zurb.com/forum/posts/11597-how-to-install-grunt-and-libsass-on-windows
When I get to Step 16 my cmd prompt gets stuck on "Installing dependencies with bower...".
I have had foundation work on my computer before but I recently had to reformat it. Thanks for any help.
I know this is an old issue but I was having the same problem today using bower to install angular sanitize, and wanted to add my two cents, in case someone has this issue again.
Not sure if this is the best solution but it worked: I added the force flag
bower install --force
you can also try before:
bower cache clean
bower cache list
Also I deleted the libraries that bower had pulled in previously
I spent a lot of time trying to fix this problem... and I have solution! :) I think it's a problem between node.js and npm versions. I noticed that when I have newest node.js I don't have problem with npm ERR! when I start in CMD npm install -g bower and then run foundation new project_name --libsass I notice the "Installing dependencies with bower..." process goes on and on ....
However, when I installed node.js version 0.10.x and create a new Foundation project, the "Installing dependencies with bower..." works properly but I have an npm ERR! (and earlier when typing "npm install -g bower").
Conclusion:
If you have node.js version > 0.10.x uninstall it and restart computer.
Install node.js version 0.10.x (I have node-v0.10.9-x86) and restart computer.
Upgrade npm to latest version. Good tutorial how to do it here:
https://github.com/npm/npm/wiki/Troubleshooting in section "Upgrading on Windows" and restart computer.
Check your npm version: open CMD and typing it "npm -v", if you see npm 2.5.1 or later (for future) you successfull updated npm...
Install everything else as-per:
http://foundation.zurb.com/forum/posts/11597-how-to-install-grunt-and-libsass-on-windows
Hope it helps!
Arcady
P.S.
I have Windows 64-bit, I installed rubyinstaller-1.9.3-p551, and newest Git version...
I have the same problem and did a Ctrl+C to stop installing dependencies with bower. Then did bower update command while in the directory where my website was and it finished adding all the correct files.
Hello I got the same problem. Try to clear bower cache it solved my problem
bower cache clean
bower cache list
Hope it helped you
I reinstalled bower globally, and it worked.
npm install -g bower
i have the same problem. I'm on windows 8.1 x64. Tried: Cleaning bower cache, added bower to environment path, reinstalled node.js. I didn't found a resolution but you can try this:
Download this starter compass project and unzip it
Copy the files to Your project folder.
In CMD go to your project directory and Run "bower install" to install the latest version of Foundation.
Next run "compass watch".
Now open index.html