Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm ERR! cb() never called! when trying to install mern-cli globally #21201

Open
1 of 14 tasks
kennyek opened this issue Jul 12, 2018 · 4 comments
Open
1 of 14 tasks

npm ERR! cb() never called! when trying to install mern-cli globally #21201

kennyek opened this issue Jul 12, 2018 · 4 comments
Labels

Comments

@kennyek
Copy link

kennyek commented Jul 12, 2018

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • npm is producing incorrect or undesirable behavior.
  • Other (see below for feature requests):

What's going wrong?

I try to install mern-cli globally by running sudo npm install -g mern-cli. npm produces an Unhandled rejection Error and states npm ERR! cb() never called!

How can the CLI team reproduce the problem?

Run sudo npm install -g mern-cli.

Gist

supporting information:

  • npm -v prints: 6.1.0
  • node -v prints: v10.6.0
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: Linux
  • Network issues:
    • Geographic location where npm was run: Gnosjo, Sweden
    • I use a proxy to connect to the npm registry.
    • I use a proxy to connect to the web.
    • I use a proxy when downloading Git repos.
    • I access the npm registry via a VPN
    • I don't use a proxy, but have limited or unreliable internet access.
  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).
@DanielRuf
Copy link

sudo npm install -g mern-cli

First, do not use sudo.

Please try a downgrade to npm 5 to see if this solves the issue.

@kennyek
Copy link
Author

kennyek commented Jul 12, 2018

Thank you for assistance.

First, do not use sudo.

If I don't use sudo when using the global switch I get EACCES: permission denied and it suggests running as root/admin even thought it is not recommended.

Please try a downgrade to npm 5 to see if this solves the issue.

The issue still persists at npm 5.10.0.

New gist after downgrading npm

@DanielRuf
Copy link

If I don't use sudo when using the global switch I get EACCES: permission denied and it suggests running as root/admin even thought it is not recommended.

This means that you have probably installed npm with sudo which should not have happened in the first place.

@kennyek
Copy link
Author

kennyek commented Jul 12, 2018

This means that you have probably installed npm with sudo which should not have happened in the first place.

Npm came bundled with NodeJs, which I installed following the instructions on NodeJs' installing via package manager guide:

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

Is there a second, recommended, way of installing npm?

@kenany kenany added the support label Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants