Skip to content

Can't run any command #9276

@raffy-dev

Description

@raffy-dev

Versions

node -v v8.9.4
npm -v 5.6.0

Repro steps

installed new angular cli

npm install -g @angular/cli

Output

C:\Users\xxx\AppData\Roaming\npm\ng -> C:\Users\xxx\AppData\Roaming\npm\node_modules@angular\cli\bin\ng
npm WARN @angular-devkit/schematics@0.0.49 requires a peer of @angular-devkit/core@0.0.26 but none is installed. You must install peer dependencies yourself.
npm WARN @schematics/angular@0.1.14 requires a peer of @angular-devkit/core@0.0.26 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules@angular\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

  • @angular/cli@1.6.4

Observed behavior

I get the same error no matter what ng command I run 
ng --version
ng new app

> module.js:540
>     throw err;
>     ^
> 
> Error: Cannot find module '@angular-devkit/core'
>     at Function.Module._resolveFilename (module.js:538:15)
>     at Function.Module._load (module.js:468:25)
>     at Module.require (module.js:587:17)
>     at require (internal/module.js:11:18)
>     at Object.<anonymous> (C:\Users\xxx\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\src\tree\virtual.js:10:16)
>     at Module._compile (module.js:643:30)
>     at Object.Module._extensions..js (module.js:654:10)
>     at Module.load (module.js:556:32)
>     at tryModuleLoad (module.js:499:12)
>     at Function.Module._load (module.js:491:3)

Desired behavior

Mention any other details that might be useful (optional)

I tried to uninstall nodejs and npm and reinstall
Also remove angular and reinstall
npm uninstall -g angular/cli
npm cache clean
npm install -g @angular/cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions