inotify@1.4.1 不支持的平台:想要 {“os":“linux",“arch":“any"} [英] Unsupported platform for inotify@1.4.1: wanted {"os":"linux","arch":"any"}

查看:29
本文介绍了inotify@1.4.1 不支持的平台:想要 {“os":“linux",“arch":“any"}的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在为我的 webpack/reactjs 应用程序安装软件包时,我遇到了一个非常奇怪的错误.

I am coming across a very bizarre error when installing packages for my webpack/reactjs application.

我正在尝试安装

npm install copy-webpack-plugin --save dev

构建/启动脚本失败,终端显示以下错误:

The build/start scripts fail and the following error is shown in the terminal:

Unsupported platform for inotify@1.4.1: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"x64"})

这对我来说意味着绝对注意,我在网上找不到任何明确的解释.我不知道为什么需要inotify,也不知道它是何时/何地安装的.

This means absolutely noting to me and I cannot find any clear explanations online.I do not know why inotify is needed or when/where it has been installed.

Package.json 脚本:

Package.json scripts:

  "scripts": {
    "start": "node server.js",
    "build": "cross-env BABEL_ENV=production ./node_modules/.bin/webpack --config webpack.config.production.js",
    "lint": "eslint --cache --ignore-path .gitignore --format=node_modules/eslint-formatter-pretty . *.js",
    "test": "npm run lint"
  },

推荐答案

您的命令中有一个拼写错误:

There is a typo in your command:

npm install copy-webpack-plugin --save dev

应该是:

npm install copy-webpack-plugin --save-dev

(你忘了破折号)

打字错误会使 npm 尝试安装 https://www.npmjs.com/package/dev,依赖于inotify.

The typo will make npm try to install https://www.npmjs.com/package/dev, which depends on inotify.

您的错误消息是因为 inotify 仅适用于 Linux,而您使用的是 Mac.

Your error message is because inotify only works on Linux and you are on a Mac.

这篇关于inotify@1.4.1 不支持的平台:想要 {“os":“linux",“arch":“any"}的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆