Angular CLI: 6.0.5
Node: 9.11.1
OS: linux x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.6.5
@angular-devkit/core 0.6.5
@angular-devkit/schematics 0.6.5
@schematics/angular 0.6.5
@schematics/update 0.6.5
rxjs 6.2.0
typescript 2.7.2
The initialisation of new project is fucked, namely:
some normal output here and then this below:
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":"linux","arch":"x64"})
added 1096 packages from 1278 contributors and audited 21840 packages in 79.115s
found 13 vulnerabilities (9 low, 4 high)
run npm audit fix to fix them, or npm audit for details
Successfully initialized git.
WARNINGS AND VULNERABILITIES JUST AFTER CREATING BASE PROJECT!? SERIOUSLY!?
smooth creation of new project
none
@vanqyard Okay, let's clear this up.
First of all, no one is going to take you seriously with that tone. If you are actually having concerns, please do give it a whirl and try reporting your issue again, but this time in a more professional manner. Show some respect towards the developers and the community.
The warning you've posted is for fsevents
, which - as the message so clearly states - is an optional dependency only available on OS X.
fsevents
Native access to OS X FSEvents in Node.js
The FSEvents API in OS X allows applications to register for notifications of changes to a given directory tree. It is a very fast and lightweight alternative to kqueue.
Whichever package requires said dependency has a fallback in place for other systems. Optional dependencies are a widely used feature of npm, and the warning is simply to let you know that said fallback method will be employed in place of fsevents
, because you are using an incompatible system.
Moreover, vulnerability reporting (or auditing, if you will) is a fairly new feature of npm. The Angular team does not control the entire ecosystem; it depends on a tree of dependencies, and so has no real control over these dependencies being up-to-date at all times.
The reported vulnerabilities are for these dependencies, not Angular itself. For all you know, Angular - along with its tree of dependencies - is not using the vulnerable packages in a way that actually exposes their flaws, especially because they only ever exist on your development machine, so it's entirely invisible to the (potentially evil) end user.
I'm open to a civilized argument if you - or anyone else - have anything to add.
This is also a dupe of https://github.com/angular/angular-cli/issues/10799
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
what is this can i know how to fix this i am rtrying from 3 days to fixx this help me to get out this problem
@sharif210 I think you need to spend a bit more time explaining the problem and maybe doing a Google search of the error, but that aside have you tried npm install @angular/cli@latest
? I found this by Googling for angular 6 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]
which displays this https://github.com/angular/angular/issues/24175 as the first result.
@sharif210 I've actually explained what optional dependencies are just above your comment.
The warning you've posted is for
fsevents
, which - as the message so clearly states - is an optional dependency only available on OS X.
You use Windows, so fsevents
is simply not available to you. You don't need to worry about that. It's a warning, not a fatal error. Feel free to ignore it.
@mtpultz That issue you've linked is about an actual error, and the warning about fsevents
is simply there because the author of said issue is also using Windows. While installing the latest CLI has fixed their problem, it hasn't made this warning go away, because nothing will, because it doesn't need to - it's _optional_.
@skreborn based on your explanation ("simply to let you know"), a missing optional dependency should be an INFO rather than a WARN.
Warnings are things that need to be taken seriously - things like "npm WARN [email protected] requires a peer of redux@^2.0.0 || ^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself."
What do you think?
PS: kind of embarrassed to be posting this to an issue with such an awful title. Thanks for responding politely to the OP :)
@alanvgreen I somewhat agree with you. I do not know what was the decision behind making this specific message a WARN
instead of INFO
, but I can imagine that it has something to do with bringing your attention to it.
Something went wrong, and while you can't really do anything about - short of switching your entire OS of course - it still isn't an error, because normal operation can continue, so it's definitely not an ERR
, but it's more than simple INFO
, because somethings still did go awry. Surely there is a fallback in place, but this might be slower and bigger than the optional dependency, so it requires your attention. At least that's my theory. _Don't take my word for it, as I'm no expert on the topic._
Thank you for raising the question though, it's interesting to see how different messages both under the WARN
category can be of different severity. To be fair, the peer dependency error might also be risen if you install a different version of this dependency that you know to work, but is not officially supported. That, again, leaves you in a state where your dependencies work together and everything is operational, but you're still warned to the possibility that this is not officially supported and might break in the future.
Anyway, I suppose this is more of a philosophical question now than on-topic conversation - the hows and whys of npm message categorizing -, so I suggest we leave it at that, unless of course we can contribute to the issue at hand. Have an amazing day!
@skreborn
I am a Virgo. It is not good to see an error. Is there a solution?
Yeah i do have a solution for it.I came through with solution
On Wed, 4 Jul 2018 at 10:38 AM, keyesone66 notifications@github.com wrote:
@skreborn https://github.com/skreborn
I am a Virgo. It is not good to see an error. Is there a solution?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angular-cli/issues/11031#issuecomment-402364493,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Al6dWXQ-3x3kI8rg_O-dNswGOf0ye4Hoks5uDE3bgaJpZM4UPUE5
.
@sharif210 You mentioned you have a solution for it, what is it? it's been driving me crazy for days and it's stopping me from deploying my project on Docker!
I agree the language this post was written is inappropriate. But I have a similar problem as that warning, run inside a maven build, becomes an error and is flagged by most CI server tools. Has anyone found a workaround to this? Probably this is a thread for NPM instead of angular-cli.
@jacopolanzoni Have you tried any of these? It seems like npm has options to disable automatic audits.
No, but I was hoping in something which turned off only this kind of warning instead of all the audit checks. But thanks for the link.
I got a perfect solution about this already thing is run npm serve in
terminal then npm serve —open
On Thu, 12 Jul 2018 at 7:09 PM, Jacopo Lanzoni notifications@github.com
wrote:
No, but I was hoping in something which turned off only this kind of
warning instead of all the audit checks. But thanks for the link.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angular-cli/issues/11031#issuecomment-404515244,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Al6dWYSvYZLvWHUl2aRFgbRxl59qAIhCks5uF1GlgaJpZM4UPUE5
.
@sharif210 your solution is not acceptable. 'npm serve' and 'npm install' are two different things. If I have got a problem running one script, you cannot propose to run another script. This is just common logic, mate.
I am facing same issue since last week
remove all related folders of node js,git hub and vs code. Then install all
after that check whether they are istalled correctly .then check the
version of npm by typing npm -v in terminal then install angular/cli
pakages,then try to run by using npm serve,then type npm serve
--open......THIS IS HOW I CAME THROUGH THAT PROBLEM.......I ALSO ENGAGED
WITH SAME PROBLEM.SO DO TRY WHAT I SAID IF YOU ARE NOT ABLE TO GET DESIRED
RESULT LET ME KNOW.
On 13 July 2018 at 21:18, Onkar Nawghare notifications@github.com wrote:
I am facing same issue since last week
[image: image]
https://user-images.githubusercontent.com/6582863/42700706-2f27716c-86e2-11e8-9f20-e0b2c5e73edc.png—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angular-cli/issues/11031#issuecomment-404873151,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Al6dWen34vlTuacLUY2wMQYI7rlUKMlkks5uGMFZgaJpZM4UPUE5
.
OP is a dupe of #10963
Just to clarify some things, only because in this thread several people did a big effort explaining some things, I want to conclude with the rationale problem.
fsevents is just a platform dependant file-watcher optimized for OSX. Same as any inode/inotify implementation compatible with almost any Unix system.
Whats the matter?
Developers just add this library without care about target platform. And in a world which most servers are Linux and several desktop-develop are Windows is a pity.
What to do?
When people will stop to search for this issue (aka ETA)?
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
@vanqyard Okay, let's clear this up.
First of all, no one is going to take you seriously with that tone. If you are actually having concerns, please do give it a whirl and try reporting your issue again, but this time in a more professional manner. Show some respect towards the developers and the community.
The warning you've posted is for
fsevents
, which - as the message so clearly states - is an optional dependency only available on OS X.Whichever package requires said dependency has a fallback in place for other systems. Optional dependencies are a widely used feature of npm, and the warning is simply to let you know that said fallback method will be employed in place of
fsevents
, because you are using an incompatible system.Moreover, vulnerability reporting (or auditing, if you will) is a fairly new feature of npm. The Angular team does not control the entire ecosystem; it depends on a tree of dependencies, and so has no real control over these dependencies being up-to-date at all times.
The reported vulnerabilities are for these dependencies, not Angular itself. For all you know, Angular - along with its tree of dependencies - is not using the vulnerable packages in a way that actually exposes their flaws, especially because they only ever exist on your development machine, so it's entirely invisible to the (potentially evil) end user.
I'm open to a civilized argument if you - or anyone else - have anything to add.