ng: command not found while creating new project using angular-cli

后端 未结 30 2909
忘掉有多难
忘掉有多难 2020-11-28 23:42

Installed angular-cli globally using (npm install -g angular-cli) but when I\'m trying to create project using ng new my-project it is throwing err

30条回答
  •  生来不讨喜
    2020-11-28 23:55

    Same problem here running Windows 10 x64 / NodeJS 6.9.1 / npm 3.10.9.
    After installation of Angular CLI via npm:

    'ng' command cannot be found

    Do the following:

    1. Uninstalled npm with npm uninstall -g npm
    2. Uninstalled NodeJS via control panel / programs and features
    3. Downloaded and ran 'old' NodeJS installer release 6.5.0 from https://nodejs.org/download/release/v6.5.0/ (node-v6.5.0-x64.msi).
    4. After NodeJS 6.5.0 installation completed, open powershell and npm install -g angular-cli
    5. Grab quick coffee
    6. After installation completed, ng worked OK.

    HTH

提交回复
热议问题