简体   繁体   English

与您的操作系统或架构不兼容:fsevents@1.0.11

[英]Not compatible with your operating system or architecture: fsevents@1.0.11

I'm using Ubuntu 15.04.我正在使用 Ubuntu 15.04。 While running the following command:在运行以下命令时:

npm install fsevents

I'm getting following error:我收到以下错误:

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.11
npm WARN tutorial@1.0.0 No repository field.

Has anybody solved this?有没有人解决过这个问题?

I was facing the same issue with this dependecy when building other application.在构建其他应用程序时,我遇到了与此依赖关系相同的问题。

Just for the sake of knowledge and to people who are not well used to NPM, and thus uncertain about how their applications will behave:只是为了知识和那些不太习惯 NPM 的人,因此不确定他们的应用程序将如何运行:

Since fsevents is an API in OS X allows applications to register for notifications of changes to a given directory tree .由于fseventsOS X 中API,因此应用程序可以注册对给定目录树的更改通知 Running:运行:

npm install --no-optional

Will do the trick, with no drawbacks.会做的伎俩,没有缺点。

这不是错误,只是警告:它是一个可选的依赖项。

您可以使用以下命令行告诉 npm 默认不安装可选依赖项:

npm config set optional false

If you're getting ERR!如果您遇到错误! not WARN a likely cause of this issue is that you're using a really outdated version of NPM not WARN 此问题的一个可能原因是您使用的是非常过时的 NPM 版本

For me, I shelled into some server, and was like "why won't this work?", getting this error:对我来说,我进入了一些服务器,就像“为什么这行不通?”,得到这个错误:

npm ERR! Linux 4.4.0-130-generic
npm ERR! argv "/home/william/.nvm/versions/node/v4.4.3/bin/node" "/home/william/.nvm/versions/node/v4.4.3/bin/npm" "install"
npm ERR! node v4.4.3
npm ERR! npm  v2.15.1
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents@1.1.3
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! Please include the following file with any support request:
npm ERR!     /home/william/app/mcard-api/npm-debug.log

Turns out this server (that I only recently acquired) was running npm 2.15.1.原来这台服务器(我最近才获得的)正在运行 npm 2.15.1。 I re-installed nvm, and nvm install --lts fixed it.我重新安装了 nvm,然后 nvm install --lts 修复了它。

I had same issue with dependency.我有同样的依赖问题。 Kindly check for the package.json file , add "typings":"^0.8.1" entry under devDependency section.请检查 package.json 文件,在 devDependency 部分下添加 "typings":"^0.8.1" 条目。 dont forget to add comma before :) Hope it will resolve issue.不要忘记在 :) 之前添加逗号,希望它能解决问题。

I was also facing this error when installing Redux :安装Redux时我也遇到了这个错误:

$ npm install --save react-redux
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14

What solved the issue was to add --no-optional ( argument will prevent optional dependencies from being installed ):解决该问题的是添加--no-optional参数将阻止安装可选依赖项):

npm install --no-optional --save react-redux
            ^^^^^^^^^^^^^

And now it is correctly installed:现在它已正确安装:

$ npm ls redux
ReduxProject@ /home/me/projects/reduxproject
└── redux@3.5.2 

I found if you use "yarn add ."我发现如果您使用“纱线添加”。 Yarn will exclude the fsevents will not throw an error. Yarn 会排除 fsevents 不会抛出错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM