Cannot install locally on macOS with npm
See original GitHub issueInstalls fine with -g
, but our team installs all of our “global” packages into our project’s package.json so we all have the same version.
Here is the error when installing without -g
:
fs.js:772
return binding.rename(pathModule._makeLong(oldPath),
^
Error: ENOENT: no such file or directory, rename 'bin/sam' -> '/Users/jason/code/empty-dir/node_modules/aws-sam-local/node_modules/.bin/sam'
at Object.fs.renameSync (fs.js:772:18)
at /Users/jason/code/empty-dir/node_modules/go-npm/bin/index.js:62:12
at /Users/jason/code/empty-dir/node_modules/go-npm/bin/index.js:51:9
at ChildProcess.exithandler (child_process.js:262:7)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Socket.stream.socket.on (internal/child_process.js:348:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:6 (4 by maintainers)
Top Results From Across the Web
npm install fails on Mac OS - node.js
I did a brew install npm and now am trying to run an app locally, and I get this. I don't have a...
Read more >How to install Node.js and npm on macOS
In this post, we'll be looking at three different ways to install Node.js and its package manager, Node Package Manager, on macOS.
Read more >Instructions on how to fix npm if you've installed Node ...
This solution fixes the error caused by trying to run npm update npm -g . Once you're finished, you also won't need to...
Read more >Downloading and installing Node.js and npm
We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can...
Read more >How to install TypeScript on Mac using Node NPM
You may have to use sudo if you don't have permissions. Output YUSUF-MacBook-Pro:~ yusufshakeel$ sudo npm install -g typescript Password: /usr/local/bin/tsc -> ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A fix has been merged: https://github.com/sanathkr/go-npm/pull/3
Just an FYI, this also impacts installation on windows.