koque
koque

Reputation: 2256

Angular/cli not installed properly

When I install angular/cli I get the following:

$ npm install  @angular/cli

npm WARN saveError ENOENT: no such file or directory, open 
'sandbox2\package.json'
npm WARN enoent ENOENT: no such file or directory, open 
'sandbox2\package.json'
npm WARN sandbox2 No description
npm WARN sandbox2 No repository field.
npm WARN sandbox2 No README data
npm WARN sandbox2 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] 
(node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
[email protected]: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"win32","arch":"x64"})

This is a continuation of the insallation above. I am forced to add more comments here;

+ @angular/[email protected]
updated 1 package in 54.164s
[!] 4 vulnerabilities found [22842 packages audited]
    Severity: 1 Low | 3 Moderate
    Run `npm audit` for more detail

Then creating a project fails:

$ ng new hd12
newTree.optimize is not a function

Upvotes: 1

Views: 1221

Answers (1)

koque
koque

Reputation: 2256

Problem is with the latest version of angular/cli. $npm install @angular/cli@latest

Used last known working version: npm install --save-dev @angular/[email protected]

Upvotes: 4

Related Questions