小编Jos*_*nus的帖子

运行yarn后,Mac book更新后get fsevents命令失败

MacBook 更新到 v12.4 后,当我尝试在 React Native 项目上运行 YARN 命令时,出现此错误:

error /Users/jaugustinus/Documents/Dev/Service-Bay/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /Users/jaugustinus/Documents/Dev/Service-Bay/node_modules/fsevents
Output:
node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: spawn node-gyp ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn node-gyp',
  path: 'node-gyp',

Run Code Online (Sandbox Code Playgroud)

该命令昨天运行良好,唯一的变化是 Mac 操作系统更新。

也尝试过运行

rm -rf node_modules
yarn cache clean …
Run Code Online (Sandbox Code Playgroud)

react-native

7
推荐指数
2
解决办法
3013
查看次数

标签 统计

react-native ×1