简体   繁体   English

npm WARN notsup 跳过可选依赖:fsevents 不受支持的平台

[英]npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents

I'm trying to run this project .我正在尝试运行这个项目 After updating minimatch version to 3.10.9, I'm getting the following error:minimatch版本更新到 3.10.9 后,出现以下错误:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\webpack\node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})

My configuration:我的配置:

Node v - 4.4.2
npm v - 3.10.9
32 bit windows OS

It's a warning, not an error.这是一个警告,而不是错误。 It occurs because fsevents is an optional dependency, used only when project is run on macOS environment (the package provides 'Native Access to Mac OS-X FSEvents').它发生是因为fsevents是一个可选依赖项,仅在项目在 macOS 环境上运行时使用(该包提供“对 Mac OS-X FSEvents 的本机访问”)。

And since you're running your project on Windows, fsevents is skipped as irrelevant.由于您在 Windows 上运行项目, fsevents被忽略为无关紧要。

There is a PR to fix this behaviour here: https://github.com/npm/cli/pull/169这里有一个 PR 来解决这个问题: https ://github.com/npm/cli/pull/169

This still appears to be an issue, causing package installations to be aborted with warnings about optional packages not being installed because of "Unsupported platform".这似乎仍然是一个问题,导致软件包安装被中止,并警告说由于“不受支持的平台”而未安装可选软件包。

The problem relates to the "shrinkwrap" or package-lock.json which gets persisted after every package manager execution.问题与“shrinkwrap”或package-lock.json ,它在每次包管理器执行后都会持续存在。 Subsequent attempts keep failing as this file is referenced instead of package.json .由于引用了此文件而不是package.json ,因此后续尝试继续失败。

Adding these options to the npm install command should allow packages to install again.将这些选项添加到npm install命令应该允许包再次安装。

   --no-optional argument will prevent optional dependencies from being installed.

   --no-shrinkwrap argument, which will ignore an available package lock or
                   shrinkwrap file and use the package.json instead.

   --no-package-lock argument will prevent npm from creating a package-lock.json file.

The complete command looks like this:完整的命令如下所示:

    npm install --no-optional --no-shrinkwrap --no-package-lock

nJoy!开心!

使用参数--force:

npm i -f

这已被注册为NPM问题: https : //github.com/npm/npm/issues/14042

This answer worked for me, add this to your package.json这个答案对我有用,将它添加到你的package.json

"optionalDependencies": {
    "fsevents": "^2.3.2"
}

I`m trying to run this project https://github.com/Soundnode/soundnode-app after updating my minimatch version to 3.10.9, im getting this error我将minimatch版本更新为3.10.9后,尝试运行此项目https://github.com/Soundnode/soundnode-app ,我收到此错误

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\\webpack\\node_modules\\watchpack\\node_modules\\chokidar\\node_modules\\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"}) npm警告可选跳过功能:fsevents@^1.0.0(node_modules \\ webpack \\ node_modules \\ watchpack \\ node_modules \\ chokidar \\ node_modules \\ fsevents):npm WAN notsup跳过可选功能:{{@1.0的不受支持的平台:想要的{:“。 os“:” darwin“,” arch“:” any“}(当前:{” os“:” win32“,” arch“:” ia32“})

my configuration is Node v - 4.4.2 npm v- 3.10.9 im working on 32 bit windows OS我的配置是Node v-4.4.2 npm v- 3.10.9 im在32位Windows OS上工作

Unsupported platform for fsevents fsevents 不受支持的平台

The current best solution is upgrading your version of npm , which won't have this warning.当前最好的解决方案是升级你的 npm 版本,它不会有这个警告。

If using a Windows machine, an easy way to upgrade is with the tool Upgrade npm on Windows .如果使用 Windows 机器,一种简单的升级方法是使用工具Upgrade npm on Windows

暂无
暂无

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

相关问题 npm警告可选的跳过选择性依赖:fsevents@1.2.7 - npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 依赖关系 - 未安装错误(npm WARN可选SKIPPING OPTIONAL DEPENDENCY:fsevents@^1.0.0(node_modules \ chokidar \ node_modules \ fsevents) - Dependencies - not installed error (npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents) 无法通过npm安装socket.io,notsup fsevents@1.1.3不受支持的平台 - Failing to npm install socket.io, notsup Unsupported platform for fsevents@1.1.3 跳过可选依赖:fsevents@1.2.9 不支持的平台:想要 {“os”:“darwin”,“arch”:“any”}(当前:{“os”:“win32”,“arch”:“x64” }) - SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”}) npm WARN安装无法安装可选依赖项:不支持 - npm WARN install Couldn't install optional dependency: Unsupported 创建一个新的 angular 项目记录 NPM 警告:npm WARN optional SKIPPING OPTIONAL DEPENDENCY - Create a new angular project logs NPM Warnings: npm WARN optional SKIPPING OPTIONAL DEPENDENCY npm WARN可选dep失败,继续fsevents@0.3.6 - npm WARN optional dep failed, continuing fsevents@0.3.6 npm WARN notsup sequelize@6.1.0 不支持的引擎:想要:{“node”:“>=10.0.0”} - npm WARN notsup Unsupported engine for sequelize@6.1.0: wanted: {“node”:“>=10.0.0”} 部署到 Azure 时,fsEvents 的 Npm 错误不受支持的平台 - Npm error unsupported platform for fsEvents when deploying to Azure 安装Angular CLI时不受支持的fsevents平台错误 - Unsupported platform for fsevents error on installing Angular cli
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM