error while installing angular/cli using npm
28,520
Solution 1
Try using the below command from your project folder:
npm audit fix
If it still shows it has fixed only few of the vulnerabilities, then use the below command
npm audit fix --force
Screen shot of the command that I used in my machine
Solution 2
This warning told everything:
Unsupported platform for [email protected]: **wanted** {"os":"darwin","arch":"any"} (**current**: {"os":"win32","arch":"x64"})
Only unix-based systems use fsevents
, and You are using Windows!
Author by
prady
Front End Lead at Impetus using Angular 8, ReactJS and Javascript.
Updated on July 17, 2022Comments
-
prady almost 2 years
When I tried to install angular cli using this command
npm install -g @angular/cli
I got below mentioned error
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\@angular\cli\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules\@angular\cli\node_modules\watchpack\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules\@angular\cli\node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN [email protected] requires a peer of ajv@^6.0.0 but none was installed. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@angular\cli\node_modules\node-sass): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] postinstall: `node scripts/build.js npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
any idea whats the issue?
my node version is 6.9.2 and npm version is 3.10.9
-
prady almost 6 yearsafter successfully updating npm, when i do try to install angular/cli again i get below mentioned warnings
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@angular\cli\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) + @angular/[email protected] updated 1 package in 44.551s
and ng -v returns unrecognizable command -
Harshal Yeole almost 6 yearsWhats your npm version now?
-
prady almost 6 yearsnpm version now is 6.1.0
-
Harshal Yeole almost 6 yearsTry this
npm i -f -g npm@latest
-
prady almost 6 yearsstill same warnings and couldn't recognize ng
-
prady almost 6 yearswhile ng is not recognized as a command but this returns angular package version
npm list -g @angular/cli
C:\Users\AppData\Roaming\npm `-- @angular/[email protected] , whats missing here -
Harshal Yeole almost 6 yearstry
ng new demoProject
-
Bruno Bieri about 5 yearsI know that only unix-based systems are supported but I don't need the warning in all my builds. Do you know a way on windows to get rid of this warning?