sduser1
asked on
Error on npm install global package
Can you help with this error.
ran the command npm install --global.
I see the below error
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /Users/sdatla/build_tools/ node-v8.15 .1-darwin- x64-npm-5. 6.0/lib/no de_modules /.staging/ Newton-7c7 da797/node _modules/@ babel/code -frame
npm ERR! dest /Users/sdatla/build_tools/ node-v8.15 .1-darwin- x64-npm-5. 6.0/lib/no de_modules /.staging/ @babel/cod e-frame-bb f22dc8
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/sdatla/build_tools /node-v8.1 5.1-darwin -x64-npm-5 .6.0/lib/n ode_module s/.staging /Newton-7c 7da797/nod e_modules/ @babel/cod e-frame' -> '/Users/sdatla/build_tools /node-v8.1 5.1-darwin -x64-npm-5 .6.0/lib/n ode_module s/.staging /@babel/co de-frame-b bf22dc8'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sdatla/.npm/_logs/2 019-08-20T 18_47_33_8 88Z-debug. log
ran the command npm install --global.
I see the below error
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /Users/sdatla/build_tools/
npm ERR! dest /Users/sdatla/build_tools/
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/sdatla/build_tools
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sdatla/.npm/_logs/2
ASKER
Hi Julian,
thanks for your help. I am new and learning how npm install -g works.
I see the global package is installed in the below location.
/Users/sdatla/build_tools/ node-v8.15 .1-darwin- x64-npm-5. 6.0/lib/no de_modules /npm
i opened npmrc file and there is nothing there. It is empty.
thanks for your help. I am new and learning how npm install -g works.
I see the global package is installed in the below location.
/Users/sdatla/build_tools/
i opened npmrc file and there is nothing there. It is empty.
ASKER
Hi Julian,
thanks for your help. I am new and learning how npm install -g works.
I see the global package is installed in the below location.
/Users/sdatla/build_tools/ node-v8.15 .1-darwin- x64-npm-5. 6.0/lib/no de_modules /npm
i opened npmrc file and there is nothing there. It is empty.
thanks for your help. I am new and learning how npm install -g works.
I see the global package is installed in the below location.
/Users/sdatla/build_tools/
i opened npmrc file and there is nothing there. It is empty.
npm install --global
Was this run against an existing package.json?
Was this run against an existing package.json?
ASKER
yes. Under bin directory below, there is package.json
/Users/sdatla/build_tools/ node-v8.15 .1-darwin- x64-npm-5. 6.0/bin
/Users/sdatla/build_tools/
but are you running the npm install in that folder?
I am trying to work out what you are trying to do. As I understand it npm install will run against an existing package.json to install the packages specified with in it.
npm install pkg -g is usually applied to the installation of a package which is then installed globally and you would specify the package in the command (pkg)
I have not seen npm install -g used on its own before. Do you have any documentation you are referencing that describes the intended behaviour of this use of the command?
I am trying to work out what you are trying to do. As I understand it npm install will run against an existing package.json to install the packages specified with in it.
npm install pkg -g is usually applied to the installation of a package which is then installed globally and you would specify the package in the command (pkg)
I have not seen npm install -g used on its own before. Do you have any documentation you are referencing that describes the intended behaviour of this use of the command?
ASKER
Hi Julian,
Thanks for your help. I am using yarn to install and upgrade the packages. It works fine. I am all set with this issue now.
Thanks for your help. I am using yarn to install and upgrade the packages. It works fine. I am all set with this issue now.
You are welcome - glad to hear you are up and running.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
The -g flag is saying you want this package to be installed globally - where have you configured your global install point to be - does that exist and are the permissions on it setup correctly?