Fsevents unsupported platform linux

Warning unsupported platform for fsevents #165

Comments

ltfschoen commented Apr 24, 2017 •

  • OSX El Capitan v10.11.5
  • Node node -v : v7.9.0
  • NPM npm -v : 4.2.0

I’ve built a Yarn project. package.json contains the following versions:

Added Webpack dependencies with yarn add webpack webpack-dev-server path .
Created a Dockerfile:

When I build with the Dockerfile with docker build -t ltfschoen/my-nodejs-app:v1 . , the following warnings are output before the build completes successfully:

When I troubleshoot with npm ls fsevents , it outputs the following:

What’s causing these warnings? How do we fix?

The text was updated successfully, but these errors were encountered:

bnoordhuis commented Apr 24, 2017

fsevents is a wrapper around the OS X subsystem of the same name. There is nothing to fix, «SKIPPING OPTIONAL DEPENDENCY» means it’s working as intended.

Zainab-Ally commented Jun 6, 2017

«www» directory cannot be found. Please make sure the working directory is an Ionic project.
There was an error serving your Ionic application: «www» directory cannot be found. Please make sure the working directory is an Ionic project.

I need help on that please am facing this problem cannot proceed

RehanSaeed commented May 16, 2018

This warning is not actionable, it tells the developer nothing they need to know and it’s just an annoyance for thousands of developers accross the world who see this warning and end up Googling it to try and do something about it.

bnoordhuis commented May 16, 2018

Then complain to npm, that’s what prints the notice.

RehanSaeed commented May 16, 2018

Thanks, will raise an issue.

PowerKiKi commented Jun 8, 2018

For future reference, the issue created on npm is npm/npm#20639

NathanielHill commented Feb 20, 2019

Some quick napkin math gives me an estimate of the number of times the info/warning has been printed in the. billions. And that’s not even accounting for the fact that most CI pipelines and yarn are doing quite a lot of caching.

It appears yarn/npm are not going to do anything further about these messages. Is there any way that fsevents could just install on all platforms and just be a no-op, return false, etc on unsupported platforms?

I understand the binary issue, but seems like you could have a JS wrapper that could handle this at runtime.

tmaier commented May 23, 2019

Is it possible to improve the error message. Something like «fsevents is MacOS X. You are on Linux. Skipping it. Nothing to worry. bye!»

demisx commented Jan 11, 2020

For future reference, the issue created on npm is npm/npm#20639

This repo has been archived and read-only now.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

fsevents doesn’t install on linux #796

Comments

garyterry commented Dec 18, 2015

Hi Guys, I have got the WSK and MDL working on my windows machine at work. Some minor things seem to not work (touch images not copied on gulp serve:dist) but it’s most likely permission issues. Anyhow while trying to get wsk-0.6.0 working in Linux Mint 17.3 I’ve come across this:

/dev.server/wsk-0.6.0 $ sudo npm install
/home/dev.server/wsk-0.6.0
└── lodash@3.10.1
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.6

Which seems to be important. because it won’t build as a result.
I keep getting this error when I run gulp serve:dist (it doesn’t serve properly any other way either):

/dev.server/wsk-0.6.0 $ gulp serve:dist
[13:57:31] Requiring external module babel-core/register
/home/dev.server/wsk-0.6.0/gulpfile.babel.js:28
import fs from ‘fs’;
^^^^^^
SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at loader (/home/dev.server/wsk-0.6.0/node_modules/babel-register/lib/node.js:130:5)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
at Liftoff. (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:192:16)

I’ve tried uninstalling and reinstalling twice now. same error every time. Any suggestions? Thanks in advance.

The text was updated successfully, but these errors were encountered:

Источник

How to fix ‘Unsupported platform for fsevents@1.2.9: wanted <"os":"darwin","arch":"any">(current: <"os":"win32","arch":"x64">)

Testing binary Binary is fine npm WARN rollback Rolling back node-pre-gyp@0.12.0 failed (this is probably harmless):

EPERM: operation not permitted, lstat ‘C:\Users\orca yoon\Documents\IonicProjects\starters\epic\node_modules\fsevents\node_modules’

npm notice created a lockfile as package-lock.json. You should commit this file.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted <"os":"darwin","arch":"any">(current: <"os":"win32","arch":"x64">)

added 1105 packages from 1050 contributors and audited 53269 packages in 445.94s found 1 high severity vulnerability run npm audit fix to fix them, or npm audit for details

6 Answers 6

Run your command prompt or powershell as Administrator role. Then you’ll get avoided with PERMISSION ERROR .

Ignore npm audit fix . It only suggests you to renovate all of your package.json dependencies up-to-date. You should preserve the settings clarified in package.json .

If you’re working on ubuntu or OS X, you won’t face this issue, I guess.

PS:

According to your reply, I’d like to think about the workaround.

  • Remove the local node_modules & package-lock.json
  • Clean npm cache by npm cache verify
  • Update the global npm by sudo npm i -g npm
  • Reinstall the local node_modules by npm i

Hope this might help.

I found a solution, this is what I did:

Open your package-lock.json.

Find node_modules/fsevents, inside this there is something called «os», I had only this:

So my OS is windows 10 64 bits I just added my OS inside «os», the result is this:

then save and is solved, after doing this I could install the package I was trying to install that I couldn’t.

When seeing this kind of message on ionic or anywhere else, do run npm audit fix and see if you can successfully follow the given advice to resolve all «high severity vulnerability» issues and contribute the resulting updated dependencies back to the given codebase.

What’s happening here is that a package called chokidar is being used to «watch» filesystem directories for «events» (like files being added). chokidar is a wrapper for Linux-, Windows-, and Mac-specific filesystem-watching packages, of which fsevents is the Mac variant. So, I am pretty sure anything that uses chokidar is going to have fsevents as an optional dependency, but as others have said, this WARN message can be safely ignored, as chokidar supports all common desktop architectures.

This warning will appear if you added IOS as platform to your project and run npm i on Windows or Linux. As you can’t build IOS packages on these systems anyway you can safely ignore this warning.

If like me, you got this issue because of using two different package managers at the same time (E.g. yarn and npm), you can simply remove the lockfile and rerun your package manager.

The lockfile will be regenerated the next time you run your package manager. I got this error while trying to upgrade the packages with npm upgrade . After deleting the lockfile, upgrade proceeded smoothly and the lockfile was created correctly.

Источник

Npm error unsupported platform for fsEvents when deploying to Azure

When I run npm install, I get this error:

This has been asked here but the accepted answer that it is optional does not work for me as I am unable to publish to azure since npm install fails.

npm version : 5.6.0

I have tried:

8 Answers 8

npm i -f doesn’t sound like a good idea.

Instead, add fsevents to optional dependencies (if fsevents is in your package.json):

@Aaron is correct. This was failing when I was running npm install from within maven-frontend-plugin.

I resolved the issue using the command npm i -f ( npm install forced)

fsevents is an OS X-only module, you can’t install it on Windows.

fsevents is only needed if you are building on a Mac. If you are deploying to ubuntu, windows, etc it’s not needed.

npm package.json supports an os key,

os can be used to specify which OS a module can be installed on. optionalDependencies are module dependencies that if they cannot be installed, npm skips them and continues installing.

Either one will work. I prefer adding the following to my package.json’s root object:

It is nothing to deal with Darwin or Windows . You might have installed the Angular but system variable path is not updated accordingly .

Get the ng install location from your system something like(C:\Users. \AppData\Roaming\npm) and add at the end of system variable path .

now go to Cmd -> type ng-v for Angular 6 ( ng v or ng version for Angular 7 ).

I know this question is old, but for other people still facing this issue especially on mac0S, there seems to be some platform specificity issue around the whole thing. I encountered the problem while trying to deploy to Heroku, I did the following, the build became successful and the deployment worked afterward. So kindly do the following:

  • Add your preferred version of fsevents to optionalDependencies in your package.json
  • Run npm install afterward.

I assume you do not currently have an entry for optionalDependencies in your package.json , so here you go:

This worked effortless for me on Windows:

Go to project’s «package.lock.json» file Press «Ctrl+F» (to enable keyword search) Type «darwin» Wherever it says «darwin» in the file, change that to «win32» Restart your VS Code and you should be good to go.

add this it works for me «main»: «server.js», «type»: «module», «engines»: < "node": "16.10.0", "npm": "7.24.2" >,

Not the answer you’re looking for? Browse other questions tagged node.js azure npm or ask your own question.

Linked

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.10.8.40416

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

[BUG] WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9 #144

Comments

tooh commented Aug 1, 2019 •

Describe the bug
Warning about Unsupported platform for fsevents@1.2.9

To Reproduce

Expected behavior
Installation / upgrade without warning

Screenshots
If applicable, add screenshots to help explain your problem.

IOS (please complete the following information):

Logs
Your log in debug mode (-D option)

Config
Your config section of platform. Please do not post your whole config and especially with logins / passwords !

Additional context
Add any other context about the problem here.

The text was updated successfully, but these errors were encountered:

nicoduj commented Aug 2, 2019

Hi, could you explain more please ?

tooh commented Aug 2, 2019 •

I get this warning

nicoduj commented Aug 5, 2019

Hi, thx did you notice any unexpected behavior ?

jamesdh commented Aug 13, 2019

This can be safely ignored. It’s caused because fsevents is a package used for handling file system events in MacOS and is only used in MacOS. You’re likely installing the package in some flavor of linux, and npm is correctly telling you that the package isn’t needed/supported there.

I’m guessing it’s a transient dependency of one of the devDependencies (best guess is husky). This will not cause any unexpected behavior.

Источник

Читайте также:  Стандартный размер папки windows
Оцените статью