![](/img/trans.png)
[英]How to find out details like operating system, architecture type for my browser in Node.js?
[英]Not compatible with your operating system or architecture: fsevents@1.0.11
我正在使用 Ubuntu 15.04。 在運行以下命令時:
npm install fsevents
我收到以下錯誤:
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.
有沒有人解決過這個問題?
在構建其他應用程序時,我遇到了與此依賴關系相同的問題。
只是為了知識和那些不太習慣 NPM 的人,因此不確定他們的應用程序將如何運行:
由於fsevents
是OS X 中的API,因此應用程序可以注冊對給定目錄樹的更改通知。 運行:
npm install --no-optional
會做的伎倆,沒有缺點。
這不是錯誤,只是警告:它是一個可選的依賴項。
您可以使用以下命令行告訴 npm 默認不安裝可選依賴項:
npm config set optional false
對我來說,我進入了一些服務器,就像“為什么這行不通?”,得到這個錯誤:
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
原來這台服務器(我最近才獲得的)正在運行 npm 2.15.1。 我重新安裝了 nvm,然后 nvm install --lts 修復了它。
我有同樣的依賴問題。 請檢查 package.json 文件,在 devDependency 部分下添加 "typings":"^0.8.1" 條目。 不要忘記在 :) 之前添加逗號,希望它能解決問題。
安裝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
解決該問題的是添加--no-optional
(參數將阻止安裝可選依賴項):
npm install --no-optional --save react-redux
^^^^^^^^^^^^^
現在它已正確安裝:
$ npm ls redux
ReduxProject@ /home/me/projects/reduxproject
└── redux@3.5.2
我發現如果您使用“紗線添加”。 Yarn 會排除 fsevents 不會拋出錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.