question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install locally on macOS with npm

See original GitHub issue

Installs 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:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
m5commented, Oct 4, 2017
2reactions
ghostcommented, Sep 4, 2017

Just an FYI, this also impacts installation on windows.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found