With NodeJS, How To execute a series of node installs - node.js

I've got a file (like below) that has a list of npm install commands. I was hoping I could do
npm < files.txt
to get it to run those but that does not work. How can I install all these packages? I hate to put them all on one big line.
npm install angular angular-ui-router --save
npm install angular watchify browser-sync --save
npm install angular-mocks --save
npm install angular-sanitize --save
....

Related

how to uninstall a package that was installed with --save keyword

I'm working on a react js project with this spec:
node -v --> v16.15.1
npm -v --> 8.11.0
I usually install packages with npm install package-name --legacy-peer-deps and uninstall it with npm uninstall package-name --legacy-peer-deps which usually works fine.. but in one of the recent package I installed, I copied the command from the website and I remember there was --save keyword in it. now I want to uninstall it since I don't use it anymore so I ran this commands:
npm uninstall package-name --legacy-peer-deps
npm uninstall package-name --save --legacy-peer-deps
but the package name is still in the package.json file. what should I do to completely remove the package from my react js appliation?
remove it from your package.json and run npm install

npm install does not work in my angular project

Why npm install does not work perfectly. When i create a new angular project and copy and paste the "src" file there, npm install works. But when I copy-paste the "package.json" same as src, npm install does not work.
This error is mentioned in the nodemon documentation:
If you see the error Cannot find module 'internal/util/types', the
error is solved with a clean npm cache and trying to reinstall the
dependency you're working with.
A start is to use the following commands:
sudo npm cache clean --force
sudo npm i -g npm
You have some missing modules in node_modules folder.
try to install with auto-install.
first install the global-cli by cmd npm install -g auto-install
then run auto-install in the directory you are working in.

How does multiple install command in a single npm statement work?

Hy
Can someone explain how to read this line npm install -g gulp bower && npm install && bower install
AFAIU, I know first part of the above installs both gulp and bower npm install -g gulp bower however I'm not sure abt the rest of that statement && npm install && bower install
thanks
npm install -g gulp bower this line will install gulp and bower globally.
npm install will install all the packages locally that are defined in package.json. Refer
bower install will install the packages locally that are defined in bower.json. Refer
The && is used to concat each of the commands to run one after another
The && just chains the commands one after the other. So it is like you have
npm install -g gulp bower
npm install
bower install
npm install will install dependencies listed in package.json.
bower install will install dependencies listed in bower.json.

Unable to npm install or start with electron-quick-start

I am using the version of node that is stated on electron's site, which is 7.4.0 and I'm using NPM version 4.0.5 (Windows).
The problem I'm having is with the npm install command in the cloned electron-quick-start folder. I have tried using the command with --save-devand -g but they don't do anything to help.
Upon using just npm install;
fetchMetadeta: still install loadAllDepsIntoIdealTree
With the above stated arguments (output);
--electron-quick-start#1.0.0
Then npm start after the above output;
Pastebin
Any help would be greatly appreciated, thanks.
You must get npm install to work before you can start the app
You could try the following
npm cache clean
npm install This will cache clean of npm
npm install -g yarn
yarn install This will install yarn (This will probably work but it might not be what you're looking for). Yarn is an alternative to npm
npm -g install npm
npm install This will reinstall npm
And I would look into nvm and nvm-windows
And if none of those work I would look at
this issuse on github
And if that doesn't work I would just look at google

NPM install delete node modules NPM install

I am adding a node module to a project of mine and I am not able to build the project till I do an npm install delete the node modules folder and do an npm install again. Just deleting the node modules and doing an npm install does not fix it.

Resources