I'm attempting to install this project globally using npm i -g.
These are the steps:
git clone https://github.com/superflycss/cli
cd cli
npm i
npm i -g
The result is:
ole#mki:~/cli$ npm i -g
npm WARN checkPermissions Missing write access to ~/cli/node_modules/nan
npm ERR! path /home/ole/cli/node_modules/nan
Thoughts?
If I try to cd node_modules/nan there is no such directory ... so that's one thing. I'm not sure why it's trying to access that?
Deleted all the contents of my local ~/.npm-packages directory and reinstalled and now it works:
cd ~/.npm-packages
rm -fr *
cd ~/cli
npm i -g
Related
I try to install node packeges with nmp. When i run, it says:
up to date, audited 356 packages in 7s
found 0 vulnerabilities
I see it as a dependency in my package-json like this:
"dependencies": {
"express": "*",
"nodemon": "*"
}
but there is no node_modules was installed..
Hope someone can help.
edit: I tried the commands given in the answers but it didn't work. still same
ss from editor
These commands solve the same problem and have a look at the attached links.
https://github.com/npm/npm/issues/17282
Can't install anything using "npm install"
npm install -g npm
npm cache clean
npm update
npm install
There are a few fixes to this issue.
The first one is to install the dependencies manually, as so.
$ npm install -s express nodemon
The command should install express and nodemon at the latest versions.
The second option is to run a few commands, as so (in the order given).
$ npm install -g npm
$ npm cache clean --force
$ npm update
$ npm install
Basically, these are what the commands do (from 1-4).
This installs npm from npm (sounds weird, but there is an npm package).
This command forcefully cleans out the cache of npm.
As you can tell, npm update updates npm!
Finally, this command should be run in a directory where there is a package.json file. This installs all the dependencies listed in package.json.
Don't type out the $ in the terminal examples!
I am using:
node -v
v10.15.3
npm -v
6.4.1
I have tried below mentioned command
command: npm i -g angular/cli
Error while executing: npm ERR! /usr/local/bin/git ls-remote -h -t
ssh://git#github.com/angular/cli.git
command: npm i -g #angular/cli
npm ERR! path /Users/admin/.node_modules/bin/ng npm ERR! code EEXIST
npm ERR! Refusing to delete /Users/admin/.node_modules/bin/ng:
../lib/node_modules/angular-cli/bin/ng symlink target is not
controlled by npm
/Users/admin/.node_modules/lib/node_modules/#angular/cli npm ERR! File
exists: /Users/admin/.node_modules/bin/ng npm ERR! Move it away, and
try again.
Make sure you have the correct path in Enviroment variable -> user variable like this
In this case my npm folder are located at
C:\Users\phuc.ngo\AppData\Roaming\npm
The npm folder is where everything you install can be found like angular cli, webpack, etc...
You need to try installing angular with admin previledge and try to install it globally with -g
npm install -g #angular/cli
after installation check the angular version
ng --version
What is the difference between npm i and npm install commands? Both install all node Modules from package.json.
I know that it means to install. It could be possible that there is some difference between i and install.
There is no difference, since "npm i" is an alias for "npm install". They both do the exact same thing (install or update all the dependencies in your package-lock.json).
Docs: https://docs.npmjs.com/cli/install via CRice
npm install (aliases: npm i, npm add ) (with no args, in package dir)
npm install [<#scope>/]<name>
npm install [<#scope>/]<name>#<tag>
npm install [<#scope>/]<name>#<version>
npm install [<#scope>/]<name>#<version range>
npm install <git-host>:<git-user>/<repo-name>
npm install <git repo url>
npm install <tarball file>
npm install <tarball url>
npm install <folder>
Whenever I try to do anything with my NPM I keep on getting this error.
I try to install npm install -g --save vue-draggable
I have uninstalled node and npm and re installed and constantly having this issue.
npm ERR! path /Users/victor/Desktop/myprog/node_modules/jquery/node_modules/npm/node_modules/dezalgo
NPM Verson: 5.6.0
Node: v8.9.1
To anyone having this problem, its because NPM is version 5.6.0
Downgrade to:
Sudo npm install -g npm#4.6.1
I don't think that the accepted solution will solve the issue...
Somehow a dependancy representation in package-lock.json is wrongly described.
Removing the file package-lock.json and npm install could solve the issue.
I recommend that you use the latest version of npm : npm install npm#lastest.
I have installed npm on my Laravel Project.
When I run npm install --save vue-draggable
I get this error
ENOENT: no such file or directory, rename '/Users/victori/Desktop/project-1/node_modules/npm/node_modules/dezalgo
Although, when I run npm install -g --save vue-draggable it works. Although, id want it onto my actual project files.
NPM Verson: 5.6.0
Node: v8.9.1