Please I need your help whenever I try to install anything with npm I always get errors please help me.
Update
From what read from the docs you should install the #ionic/cli
$ npm install -g #ionic/cli
From the docs:
If there was a previous installation of the Ionic CLI, it will need to be uninstalled due to a change in package name.
$ npm uninstall -g ionic
$ npm install -g #ionic/cli
You may want to add debug info while installing e.g.:
$ npm install -dd -g #ionic/cli
From your screenshot not sure if there is an error with your GIT config, or permissions to install the ionic cli globally on your machine...
Outdated
There should not be a space between ionic and #4, you should run e.g.:
npm install -g ionic#4
You can try with command like this npm install -g ionic#{{version}}.
In the place of version you should put your prefered version.
Related
Running Windows 10 Enterprise.
I am trying to install angular cli to run the angular project. I entered below command.
--> npm install -g #angular/cli
I m getting below error.
--> npm ERR! code ENOVERSIONS
--> npm ERR! No valid versions available for undefined
what am i doing wrong
Seems to be you have to uninstall the node version and have to install it again
In order to run the npm install -g #angular/cli You need to have the node installed. Please find the below link to install the relevent node version for your PC. And try running the npm install -g #angular/cli command again.
Download the Node.js
Please make sure old node_modules are completely deleted and package-lock.json . Try fresh npm install now
rm package-lock.json
rm -rf node_modules
npm install
When I try to install gatsby running npm install gatsby-cli -g , it shows that is successfuly installed but it does not work when I run gatsby --help oder gatsby -- build .... , it shows:
-bash: gatsby: command not found
the reason you are getting that is that you haven't installed it globally
$ npm i -g gatsby
$ source ~/.bashrc
source will refresh your terminal so you don't need to close it and open it up again
cli commands only work with globally installed packages
The Gatsby CLI is available via npm and should be installed globally by running:
npm install -g gatsby-cli
If you are unable to successfully run the Gatsby CLI due to a permissions issue, you may want to check out the npm docs on fixing permissions.
global flag -g comes first while installing any package
instead of npm install gatsby-cli -g run npm i -g gatsby-cli
any of below will work
npm install --global <package_name_to_install>
npm install -g <package_name_to_install>
npm i --global <package_name_to_install>
npm i -g <package_name_to_install>
for you package_name_to_install is gatsby-cli
C:\dev\myApp> ng serve -o
Your global Angular CLI version (6.0.8) is greater than your local version (1.0.2).
The local Angular CLI version is used.
To disable this warning use `"ng config -g cli.warnings.versionMismatch false"`
I don't know what to do with this.
I tried uninstalling angular/cli and npm cache clean but still have problems.
Anyone help me !
You have the old angular/cli package in your package.json
To update use:
npm r angular-cli
npm i #angular/cli#latest -D
Be aware though, if you have already been using the old cli for a long time, you might have to do some code migration. Especially when it comes to tests, polyfills and the angular config file.
You could try to create an empty angular project using the new cli, and compare the files which are created there, with the files you have in your own project, and update where applicable.
After that, when you have to update your cli again, you can use the new ng update command
You are using new project in older CLI you need to run this commands
npm uninstall --save-dev angular-cli
npm install --save-dev #angular/cli#latest
npm install
or you can try this approach
Updating npm :
Run [sudo] npm install -g npm (sudo is only required on Mac/ Linux)
Updating the CLI :
[sudo] npm uninstall -g angular-cli #angular/cli
npm cache clean
[sudo] npm install -g #angular/cli
i have try all command above but, it don't work. Maybe you can try this command for same probblem. it work for me.
ng update #angular/cli #angular/core
npm uninstall --save-dev angular-cli
npm install
if it still problem you can visit : https://angular.io/cli/update
and you can choice "Angular Update Guide" for specify version update from X to X
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
Here are the steps I did to set up my project:
$ git clone ssh:<project>
$ cd <project>
$ nvm install 5.0
$ nvm use 5.0
I then check my node version and it appears to be correct: v5.0.0.
$ npm install
$ npm install -g react-native-cli
This all seems to go according to plan, and locally, it gives me a tree with all the correct dependencies.
When I do npm list --depth=0 -g, I get expected results.
├── npm#3.3.6
└── react-native-cli#1.0.0
So I try to run the npm start script, which is react-native start. However, whenever I try to run it, I get the following basic error:
Looks like you installed react-native globally, maybe you meant react-native-cli?
To fix the issue, run:
npm uninstall -g react-native
npm install -g react-native-cli
I've tried just about everything I can think of, down to uninstalling node and nvm completely and starting from scratch.
What is the solution to this problem?
This upcoming error message is not very helpful. Besides your npm installation issue I found also an npm start doesn't work after upgrade to 0.15.0 bugfixing issue with the same error message.
First of all you should check the symbolic link shown after npm install:
$ npm install -g react-native-cli
/usr/local/bin/react-native -> /usr/local/lib/node_modules/react-native-cli/index.js
Check if the linked file exists:
ls /usr/local/lib/node_modules/react-native-cli/index.js
If not, check your npm path settings with
npm config list
or directly in ~/.npmrc
In my case I had a wrong prefix in ~/.npmrc, which I've deleted completely. As the npm ERR! message shows after another npm install -g react-native-cli, it came up with:
npm ERR! Refusing to delete /usr/local/bin/react-native: ../lib/node_modules/react-native/local-cli/wrong-react-native.js symlink target is not controlled by npm /usr/local
npm ERR! File exists: /usr/local/bin/react-native
npm ERR! Move it away, and try again.
Look at the indicated 'wrong-react-native.js' filename at the end.
Delete that link, do a npm update and try npm install -g react-native-cli again.
Worked on MacOS X. npm installed with homebrew