Sudo Npm Install -g Nodemon For Mac Average ratng: 5,0/5 1520 reviews

Posts; Contact. Last updated Saturday, Nov 16, 2019 Setting up Node.js and npm on Mac OSX Node.js is gaining a lot of speed and is an exciting new development framework. Here's a quick overview of how to get Node.js working on OSX along with npm, the package manager for node.

Join GitHub today

How to use nodemon

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Sign up New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels

Comments

commented Aug 27, 2012

Steps to reproduce:

Run sudo npm install -g leveldb on a Mac while being logged in on a non-root account.

Here is the log:

And here is my interpretation:

When using sudo for a global install on Mac, the write to ~/.node-gyp/ fails. node-gyp attempts to fall back to a local .node-gyp folder. So far so good, but now the path pointing to .node-gyp is relative, so if the package has a gyp file that is not in the root of the module, this path is invalid and the build fails.

Suggested fix:

Wherever the path ./.node-gyp/0.8.8/ is set, set an absolute path instead.

Related issues:

node-gyp #92
npm #2340
bitcoinjs-server #82

Workaround:

Use npm's --unsafe-perm parameter, e.g. sudo npm install -g leveldb --unsafe-perm.

Closed
Closed

commented Oct 14, 2015

I am having this same problem with global npm installs. Any fixes?

commented Oct 14, 2015

Docker host.docker.internal linux. @cleechtech It's at the bottom:

Use npm's --unsafe-perm parameter

closed this Oct 14, 2015
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

I've seen sudo npm [..] in a lot of tips and gists (including some of mine :-P). While this can arguably be ok on a development machine, it's not a very smart thing to do, since npm packages can run arbitrary scripts and commands, which is unsafe, to say the least.

But, for some reason, the official Node.js installation package for OS X won't automatically adjust the necessary folder permissions for you..

If you already used the official installer, there's an easy way to repair it:

If you're installing Node.js with homebrew (brew install nodejs), everything should be set up properly.

Posts; Contact. Last updated Saturday, Nov 16, 2019 Setting up Node.js and npm on Mac OSX Node.js is gaining a lot of speed and is an exciting new development framework. Here's a quick overview of how to get Node.js working on OSX along with npm, the package manager for node.

Join GitHub today

How to use nodemon

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Sign up New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels

Comments

commented Aug 27, 2012

Steps to reproduce:

Run sudo npm install -g leveldb on a Mac while being logged in on a non-root account.

Here is the log:

And here is my interpretation:

When using sudo for a global install on Mac, the write to ~/.node-gyp/ fails. node-gyp attempts to fall back to a local .node-gyp folder. So far so good, but now the path pointing to .node-gyp is relative, so if the package has a gyp file that is not in the root of the module, this path is invalid and the build fails.

Suggested fix:

Wherever the path ./.node-gyp/0.8.8/ is set, set an absolute path instead.

Related issues:

node-gyp #92
npm #2340
bitcoinjs-server #82

Workaround:

Use npm's --unsafe-perm parameter, e.g. sudo npm install -g leveldb --unsafe-perm.

Closed
Closed

commented Oct 14, 2015

I am having this same problem with global npm installs. Any fixes?

commented Oct 14, 2015

Docker host.docker.internal linux. @cleechtech It's at the bottom:

Use npm's --unsafe-perm parameter

closed this Oct 14, 2015
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

I've seen sudo npm [..] in a lot of tips and gists (including some of mine :-P). While this can arguably be ok on a development machine, it's not a very smart thing to do, since npm packages can run arbitrary scripts and commands, which is unsafe, to say the least.

But, for some reason, the official Node.js installation package for OS X won't automatically adjust the necessary folder permissions for you..

If you already used the official installer, there's an easy way to repair it:

If you're installing Node.js with homebrew (brew install nodejs), everything should be set up properly.

...">Sudo Npm Install -g Nodemon For Mac
(16.03.2020)
  • Sudo Npm Install -g Nodemon For Mac Average ratng: 5,0/5 1520 reviews
  • Posts; Contact. Last updated Saturday, Nov 16, 2019 Setting up Node.js and npm on Mac OSX Node.js is gaining a lot of speed and is an exciting new development framework. Here's a quick overview of how to get Node.js working on OSX along with npm, the package manager for node.

    Join GitHub today

    How to use nodemon

    GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

    Sign up New issue

    Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

    By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

    Already on GitHub? Sign in to your account

    Labels

    Comments

    commented Aug 27, 2012

    Steps to reproduce:

    Run sudo npm install -g leveldb on a Mac while being logged in on a non-root account.

    Here is the log:

    And here is my interpretation:

    When using sudo for a global install on Mac, the write to ~/.node-gyp/ fails. node-gyp attempts to fall back to a local .node-gyp folder. So far so good, but now the path pointing to .node-gyp is relative, so if the package has a gyp file that is not in the root of the module, this path is invalid and the build fails.

    Suggested fix:

    Wherever the path ./.node-gyp/0.8.8/ is set, set an absolute path instead.

    Related issues:

    node-gyp #92
    npm #2340
    bitcoinjs-server #82

    Workaround:

    Use npm's --unsafe-perm parameter, e.g. sudo npm install -g leveldb --unsafe-perm.

    Closed
    Closed

    commented Oct 14, 2015

    I am having this same problem with global npm installs. Any fixes?

    commented Oct 14, 2015

    Docker host.docker.internal linux. @cleechtech It's at the bottom:

    Use npm's --unsafe-perm parameter

    closed this Oct 14, 2015
    Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

    I've seen sudo npm [..] in a lot of tips and gists (including some of mine :-P). While this can arguably be ok on a development machine, it's not a very smart thing to do, since npm packages can run arbitrary scripts and commands, which is unsafe, to say the least.

    But, for some reason, the official Node.js installation package for OS X won't automatically adjust the necessary folder permissions for you..

    If you already used the official installer, there's an easy way to repair it:

    If you're installing Node.js with homebrew (brew install nodejs), everything should be set up properly.

    ...">Sudo Npm Install -g Nodemon For Mac
    (16.03.2020)