gpt4 book ai didi

node.js - 如何修复 : "error fsevents@2.0.7: The platform "linux"is incompatible with this module. “

转载 作者:行者123 更新时间:2023-12-01 04:27:38 33 4
gpt4 key购买 nike

我想将我的网站部署到 Heroku,但出现下一个错误:

error fsevents@2.0.7: The platform "linux" is incompatible with this module.
error Found incompatible module.

我已经尝试过升级 yarn , Node ,但它没有帮助。我使用 macOS Mojave v 10.14.5,但我不明白为什么这里有 linux。


remote: -----> Installing binaries
remote: engines.node (package.json): 10.15.3
remote: engines.npm (package.json): unspecified (use default)
remote: engines.yarn (package.json): unspecified (use default)
remote:
remote: Resolving node version 10.15.3...
remote: Downloading and installing node 10.15.3...
remote: Using default npm version: 6.4.1
remote: Resolving yarn version 1.x...
remote: Downloading and installing yarn (1.17.3)...
remote: Installed yarn 1.17.3
remote:
remote: -----> Installing dependencies
remote: Installing node modules (yarn.lock)
remote: yarn install v1.17.3
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
error fsevents@2.0.7: The platform "linux" is incompatible with this module.
remote: error Found incompatible module.

最佳答案

我删除了行

fsevents@^1.2.7, fsevents@^2.0.6:
version "2.0.7"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.0.7.tgz#382c9b443c6cbac4c57187cdda23aa3bf1ccfc2a"
integrity sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ==


  optionalDependencies:
fsevents "^2.0.6"

来自 yarn.lock .接下来我删除了
    "fsevents": "2.0.7",

来自 resolutions键入 package.json
最后在 yarn install我可以看到
info fsevents@2.0.7: The platform "linux" is incompatible with this module.
info "fsevents@2.0.7" is an optional dependency and failed compatibility check. Excluding it from installation.


success Saved lockfile.

您不需要此模块,因为这仅适用于 MacOS

Native access to MacOS FSEvents in Node.js



https://www.npmjs.com/package/fsevents

关于node.js - 如何修复 : "error fsevents@2.0.7: The platform "linux"is incompatible with this module. “,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57082249/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com