如何修复fsevents@2.1.3不受支持的平台:想要的{“ os”:“ darwin”,“ arch”:“ any”}(当前:{“ os”:“ win32”,“ arch”:“ x64”})

时间:2020-10-23 09:15:41

标签: javascript node.js npm installation

当我尝试安装nodemon时,我看到了:

PS C:\WINDOWS\system32> npm install -g nodemon
C:\Users\lukos\.npm-global\nodemon -> C:\Users\lukos\.npm- 
global\node_modules\nodemon\bin\nodemon.js

> nodemon@2.0.6 postinstall C:\Users\lukos\.npm-global\node_modules\nodemon
> node bin/postinstall || exit 0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 
(node_modules\nodemon\node_modules\chokidar\node_modules\fsevents):
**npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"win32","arch":"x64"})**

+ nodemon@2.0.6
updated 1 package in 6.746s

我尝试清除npm缓存,但是它没有帮助,请卸载并尝试使用其他标志或不使用任何标志。

我可以选择看到它:

PS C:\WINDOWS\system32> npm install  nodemon

> nodemon@2.0.6 postinstall C:\WINDOWS\system32\node_modules\nodemon
> node bin/postinstall || exit 0

npm WARN saveError ENOENT: no such file or directory, open 
'C:\WINDOWS\system32\package.json'
npm WARN enoent ENOENT: no such file or directory, open 
'C:\WINDOWS\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 
(node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"win32","arch":"x64"})

+ nodemon@2.0.6
added 1 package from 1 contributor and audited 182 packages in 0.849s

10 packages are looking for funding
   run `npm fund` for details

found 0 vulnerabilities

0 个答案:

没有答案