Skip to content

cli won't install on ubuntu 16.04 without installing node-gyp manually #6727

@rotemfogel

Description

@rotemfogel

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Versions.

$ ng -v; node -v; npm -v
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.1.2
node: 8.1.2
os: linux x64
v8.1.2
5.0.3

Repro steps.

  • install ubuntu 16.04
  • install nodejs (using apt)
    sudo apt-get install -y nodejs
  • install @angular/cli
    sudo npm install -g @angular/cli

The log given by the failure.

@angular/cli refuses to install, saying root user is not allowed to write into /usr/lib/node_modules/....
The install process retries endlessly.

Desired functionality.

@angular/cli to check if node-gyp is installed an either fail saying requirement missing or install it by itself

Mention any other details that might be useful.

A fix for the issue, is manually installing node-gyp prior to installing @angular/cli

$ sudo npm install -g node-gyp
$ sudo npm install -g @angular/cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentseverity2: inconvenient

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions