在为我的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或在何时何地安装了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" },推荐答案
您的命令中有错字:
npm install copy-webpack-plugin --save dev应该是:
npm install copy-webpack-plugin --save-dev(您忘记了破折号)
拼写错误将使npm尝试安装 www.npmjs/package/dev ,具体取决于inotify.
The typo will make npm try to install www.npmjs/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":&quo
发布评论