Yarn: Yarn add/Yarn install ne peut pas installer fsevents

CrĂ©Ă© le 13 juil. 2017  Â·  29Commentaires  Â·  Source: yarnpkg/yarn

Vous souhaitez demander une fonctionnalité ou signaler un bug ?
Bogue

Quel est le comportement actuel ?

STR :

Lorsque j'essaie d'exécuter yarn add jest j'obtiens l'erreur suivante

⇒  yarn add jest
yarn add v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⱀ fsevents: 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz
[-/1] ⱀ waiting...
[-/1] ⱀ waiting...
[-/1] ⱀ waiting...
warning Error running install script for optional dependency: "/Users/Ystartsev/Work/temp/debugger.html/node_modules/fsevents: Command failed.\nExit code: 1\nCommand: sh\nArguments: -c node install\nDirectory: /Users/Ystartsev/Work/temp/debugger.html/node_modules/fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using [email protected]\nnode-pre-gyp info using [email protected] | darwin | x64\nnode-pre-gyp info check checked for \"/Users/Ystartsev/Work/temp/debugger.html/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz\nnode-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz\nnode-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz \nnode-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI) (falling back to source compile with node-gyp) \nnode-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz \nnode-pre-gyp ERR! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)\nnode-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/Ystartsev/Work/temp/debugger.html/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:77:29)\nnode-pre-gyp ERR! stack     at emitOne (events.js:115:13)\nnode-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:7)\nnode-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:195:12)\nnode-pre-gyp ERR! stack     at onErrorNT (internal/child_process.js:366:16)\nnode-pre-gyp ERR! stack     at _combinedTickCallback (internal/process/next_tick.js:102:11)\nnode-pre-gyp ERR! stack     at process._tickCallback (internasuccess Saved lockfile.
success Saved 1 new dependency.
└─ [email protected]
Done in 12.29s.

Ensuite, en exécutant le test de fil (notre alias pour plaisanterie), j'obtiens l'erreur suivante

yarn test v0.27.5
$ jest
TypeError: projects.map is not a function
    at Object.<anonymous> (/Users/Ystartsev/Work/temp/debugger.html/node_modules/jest-cli/build/cli/runCLI.js:112:28)
    at Generator.next (<anonymous>)
    at step (/Users/Ystartsev/Work/temp/debugger.html/node_modules/jest-cli/build/cli/runCLI.js:1:260)
    at /Users/Ystartsev/Work/temp/debugger.html/node_modules/jest-cli/build/cli/runCLI.js:1:490
    at Promise (<anonymous>)
    at Object.<anonymous> (/Users/Ystartsev/Work/temp/debugger.html/node_modules/jest-cli/build/cli/runCLI.js:1:171)
    at Object.module.exports [as runCLI] (/Users/Ystartsev/Work/temp/debugger.html/node_modules/jest-cli/build/cli/runCLI.js:139:50)
    at Object.run (/Users/Ystartsev/Work/temp/debugger.html/node_modules/devtools-source-map/node_modules/jest-cli/build/cli/index.js:42:17)
    at Object.<anonymous> (/Users/Ystartsev/Work/temp/debugger.html/node_modules/devtools-source-map/node_modules/jest-cli/bin/jest.js:16:25)
    at Module._compile (module.js:569:30)
error Command failed with exit code 1.

Cela se passe sur : https://github.com/devtools-html/debugger.html

Quel est le comportement attendu ?
Que la plaisanterie s'installe et s'exécute.

Veuillez mentionner votre node.js, votre fil et la version de votre systĂšme d'exploitation.

mac OS Sierra
node version: 8.1.5 (tried on other versions, same issue)
yarn version: 0.27.5
needs-repro-script

Commentaire le plus utile

J'ai dû faire une combinaison de plusieurs solutions proposées :

yarn cache clean && yarn upgrade && yarn

Cela a fait l'affaire. J'essayais d'exécuter expo install expo-notifications pour installer une dépendance dans un projet Expo . J'avais déjà supprimé node_modules et exécuté yarn install , mais pour une raison quelconque, des problÚmes persistaient. On dirait que la cache était le coupable.

Tous les 29 commentaires

Ce n'est pas un problÚme de fil, mais un problÚme avec une sous-dépendance dépendant d'une ancienne version de fsevents.

Mettez à niveau vers la v1.1.2, c'est la premiÚre version avec des binaires précompilés pour node.js 8.
https://github.com/strongloop/fsevents/issues/181

Merci!

Hmm, mais cela fonctionne dans les anciennes versions de fil et avec npm ..

Encore une remarque : cela fonctionne avec le fil 0.24.x

Impossible de reproduire ici, yarn add [email protected] fonctionne bien sur 0.28.1 / Node 8.1.3

J'ai le fil 0.27.5 et le nƓud 8.1.4 (les deux derniers que vous pouvez installer à partir de brew ). Et j'obtiens aussi ce 404 en essayant de faire :

yarn add [email protected]

Exécution sur Mac Os Sierra 10.12.5

Je n'ai pas non plus rĂ©ussi Ă  reproduire. EssayĂ© avec un cache vide, Ă  la fois avec le nƓud 6 et le nƓud 8.

@hequ @codehag pouvez-vous essayer avec le dernier fil disponible ?

J'ai crĂ©Ă© un nouveau projet de fil vide avec yarn init , vidĂ© le cache avec yarn cache clean puis essayĂ© d'installer avec yarn add [email protected] . Ceux-ci ont Ă©tĂ© exĂ©cutĂ©s sur le nƓud 8.1.4 et le fil 0.27.5.

J'ai essayĂ© ceci avec le fil 0.28.1 et j'obtiens exactement la mĂȘme erreur :

hequ @ MacBook-Pro ~/Projects/omat/yarn
└─ $ ▶ yarn add [email protected]
yarn add v0.28.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
[1/1] ⠂ fsevents: GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz
[-/1] ⠂ waiting...
[-/1] ⠂ waiting...
[-/1] ⠂ waiting...
error /Users/hequ/Projects/omat/yarn/node_modules/fsevents: Command failed.
Exit code: 1
Command: sh
Arguments: -c node install
Directory: /Users/hequ/Projects/omat/yarn/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp info check checked for "/Users/hequ/Projects/omat/yarn/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/hequ/Projects/omat/yarn/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:77:29)
node-pre-gyp ERR! stack     at emitOne (events.js:115:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:7)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:195:12)
node-pre-gyp ERR! stack     at onErrorNT (internal/child_process.js:366:16)
node-pre-gyp ERR! stack     at _combinedTickCallback (internal/process/next_tick.js:102:11)
node-pre-gyp ERR! stack     at process._tickCallback (internal/process/next_tick.js:161:9)
node-pre-gyp ERR! System Darwin 16.6.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/8.1.4/bin/node" "/Users/hequ/Projects/omat/yarn/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/hequ/Projects/omat/yarn/node_modules/fsevents
node-pre-gyp ERR! node -v v8.1.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.33
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

On dirait que l'archive n'est pas lĂ  :

hequ @ MacBook-Pro ~/Projects/omat/yarn
└─ $ ▶ wget https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz
--2017-07-18 13:21:30--  https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz
Resolving fsevents-binaries.s3-us-west-2.amazonaws.com... 52.218.192.81
Connecting to fsevents-binaries.s3-us-west-2.amazonaws.com|52.218.192.81|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-07-18 13:21:31 ERROR 404: Not Found.

Eh bien, oui, le fichier ne semble pas exister. Je ne sais pas si c'est la faute de Yarn ou la faute de fsevent ou la faute de node-gyp.

Ah ouais. ProblÚme correspondant trouvé sur la page github de fsevents. Ainsi, la version 1.1.1 précompilée n'est pas sur le s3, mais la 1.1.2 l'est.

https://github.com/strongloop/fsevents/issues/181

Essayer de yarn add [email protected] fonctionne comme prĂ©vu.

Merci @hequ. ClĂŽturer le sujet alors. LMK si nous devons le rouvrir.

Bonjour, je ne pense pas que cela devrait ĂȘtre fermĂ©.

ce qui fonctionne dans d'autres versions de fil
yarn add jest

ce qui ne fonctionne pas dans le fil 0.27.5
yarn add jest

Étant donnĂ© qu'il s'agit d'une bibliothĂšque si souvent utilisĂ©e, je pense que quelque chose ne va pas ici.

fsevents peut s'installer correctement si vous utilisez une version spĂ©cifique, c'est-Ă -dire 1.1.2, mais quelque chose a changĂ© dans le fil pour l'empĂȘcher de fonctionner mĂȘme si cela fonctionnait avant.

De plus, comme mentionnĂ© ci-dessus, yarn add [email protected] fonctionne avec du fil 0.28 et 0.24 -- donc quelque chose a Ă©tĂ© corrigĂ© / utilisĂ© pour fonctionner, mais ce qui est maintenant disponible sur brew ne s'installe pas comme prĂ©vu.

@codehag au moins sur ma machine, j'obtiens Ă©galement l'erreur 404 avec le fil 0.27.4, donc l'installation de [email protected] ne fonctionne ni sur 0.27.4 ni sur 0.27.5.

@codehag cela ressemble à un problÚme avec fsevents . Qu'attendez-vous du cÎté de Yarn pour atténuer cela ?

hm non, je m'attends Ă  ce que d'une version de fil Ă  l'autre, les choses fonctionnent :/

Je viens de rĂ©essayer avec 0.24 -- peut-ĂȘtre avez-vous raison et quelque chose a changĂ© car cela ne fonctionne plus. Je n'ai malheureusement pas le temps d'approfondir mes recherches. Merci pour votre temps.

hm non, je m'attends Ă  ce que d'une version de fil Ă  l'autre, les choses fonctionnent :/

C'est notre attente et notre objectif aussi ! ??

Je viens de rĂ©essayer avec 0.24 -- peut-ĂȘtre avez-vous raison et quelque chose a changĂ© car cela ne fonctionne plus. Je n'ai malheureusement pas le temps d'approfondir mes recherches. Merci pour votre temps.

Il se trouve que yarn et fsevents publiĂ© de nouvelles versions proches les unes des autres, vous attribuez donc la faute sur la partie fsevents ' Ă  Yarn, ce qui est comprĂ©hensible. Veuillez lire le commentaire de hequ et voir si l'utilisation de [email protected] rĂ©sout votre problĂšme.

Je pensais expliquer pourquoi il s'agit d'un problĂšme de fil. Il semble que yarn add [email protected] tentera toujours de tĂ©lĂ©charger la version 1.1.1 Ă  partir de S3. Un yarn cache clean ne rĂ©sout pas le problĂšme.

Voici un exemple de sortie.

[18:22:17] Miles:build-tool-config > yarn add [email protected]
yarn add v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⠂ fsevents: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)
[-/1] ⠂ waiting...
[-/1] ⠂ waiting...
[-/1] ⠂ waiting...
warning Error running install script for optional dependency: "/Users/Miles/Sites/build-tool-config/node_modules/rollup-watch/node_modules/fsevents: Command failed.\nExit code: 1\nCommand: sh\nArguments: -c node install\nDirectory: /Users/Miles/Sites/build-tool-config/node_modules/rollup-watch/node_modules/fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using [email protected]\nnode-pre-gyp info using [email protected] | darwin | x64\nnode-pre-gyp info check checked for \"/Users/Miles/Sites/build-tool-config/node_modules/rollup-watch/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz\nnode-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz\nnode-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz \nnode-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI) (falling back to source compile with node-gyp) \nnode-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz \nnode-pre-gyp ERR! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)\nnode-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/Miles/Sites/build-tool-config/node_modules/rollup-watch/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:77:29)\nnode-pre-gyp ERR! stack     at emitOne (events.js:115:13)\nnode-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:7)\nnode-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)\nnode-pre-gyp ERR! stack     at onErrorNT (internal/child_process.js:374:16)\nnode-pre-gyp ERR! stack     at _combinedTickCallback (internal/process/next_tick.js:138:11)\nnode-pre-gyp ERR! stack     at process._tickCallback (internal/process/next_tick.js:180:9)\nnode-pre-gyp ERR! System Darwin 16.6.0\nnode-pre-gyp ERR! command \"/usr/local/Cellar/node/8.2.1/bin/node\" \"/Users/Miles/Sites/build-tool-config/node_modules/rollup-watch/node_modules/fsevents/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"\nnode-pre-gypsuccess Saved 0 new dependencies.
Done in 11.31s.

Lorsque j'exécute yarn list , il semble que fsevents soit répertorié deux fois, une version fixe ayant la priorité.

├─ [email protected]
│  ├─ anymatch@^1.3.0
│  ├─ async-each@^1.0.0
│  ├─ fsevents@^1.0.0
│  ├─ [email protected]
│  │  ├─ nan@^2.3.0
│  │  └─ node-pre-gyp@^0.6.29
│  ├─ glob-parent@^2.0.0
│  ├─ inherits@^2.0.1
│  ├─ is-binary-path@^1.0.0
│  ├─ is-glob@^2.0.0
│  ├─ [email protected]
│  │  ├─ mkdirp@^0.5.1
│  │  ├─ nopt@^4.0.1
│  │  ├─ npmlog@^4.0.2
│  │  ├─ rc@^1.1.7
│  │  ├─ request@^2.81.0
│  │  ├─ rimraf@^2.6.1
│  │  ├─ semver@^5.3.0
│  │  ├─ tar-pack@^3.4.0
│  │  └─ tar@^2.2.1
│  ├─ path-is-absolute@^1.0.0
│  └─ readdirp@^2.0.0

Je ne sais pas pourquoi. Chokidar semble correct : https://github.com/paulmillr/chokidar/blob/master/package.json

C'est pourquoi je pense qu'il s'agit d'un problĂšme de fil avec des deps optionnels.

Ce problÚme se produit lors de l'utilisation de NPM v8, résolu le problÚme en passant à NPM V6.10.3.

Cela a recommencé à se produire et est toujours un problÚme FWIW. DerniÚre sortie :

yarn install v1.3.2
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning " > [email protected]" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "babel-core<strong i="6">@6</strong> || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc".
[5/5] 📃  Building fresh packages...
[1/5] ⠂ fsevents
[2/5] ⠂ uglifyjs-webpack-plugin
[1/5] ⠄ fsevents
[1/5] ⠈ fsevents: node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v59-darwin-x64.tar.gz
[-/5] ⠈ waiting...
[3/5] ⠈ fsevents: node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v59-darwin-x64.tar.gz
[4/5] ⠈ fsevents: node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz
[3/5] ⠁ fsevents: [fsevents] Success: "/Users/Miles/Sites/build-tool-config/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse
[4/5] ⠁ fsevents: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)
warning Error running install script for optional dependency: "/Users/Miles/Sites/build-tool-config/node_modules/sane/node_modules/fsevents: Command failed.\nExit code: 1\nCommand: node install\nArguments: \nDirectory: /Users/Miles/Sites/build-tool-config/node_modules/sane/node_modules/fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using [email protected]\nnode-pre-gyp info using [email protected] | darwin | x64\nnode-pre-gyp info check checked for \"/Users/Miles/Sites/build-tool-config/node_modules/sane/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz\nnode-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz\nnode-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz \nnode-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp) \nnode-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz \nnode-pre-gyp ERR! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)\nnode-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/Miles/Sites/build-tool-config/node_modules/sane/node_modules/node-pre-gyp/lib/util/compile.js:77:29)\nnode-pre-gyp ERR! stack     at ChildProcess.emit (events.js:159:13)\nnode-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)\nnode-pre-gyp ERR! stack     at onErrorNT (internal/child_process.js:389:16)\nnode-pre-gyp ERR! stack     at process._tickCallback (internal/process/next_tick.js:152:19)\nnode-pre-gyp ERR! System Darwin 17.3.0\nnode-pre-gyp ERR! command \"/usr/local/Cellar/node/9.3.0_1/bin/node\" \"/Users/Miles/Sites/build-tool-config/node_modules/sane/node_modules/fsevents/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"\nnode-pre-gyp ERR! cwd /Users/Miles/Sites/build-tool-config/node_modules/sane/node_modules/fsevents\nnode-pre-gyp ERR! node -v v9.3.0\nnode-pre-gyp ERR! node-pre-gyp -v v0.6.37\nnode-pre-gyp ERR! not ok \nFailed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)"
info This module is OPTIONAL, you can safely ignore this error
warning Error running install script for optional dependency: "/Users/Miles/Sites/build-tool-config/node_modules/watchpack/node_modules/fsevents: Command failed.\nExit code: 1\nCommand: node install\nArguments: \nDirectory: /Users/Miles/Sites/build-tool-config/node_modules/watchpack/node_modules/fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using [email protected]\nnode-pre-gyp info using [email protected] | darwin | x64\nnode-pre-gyp info check checked for \"/Users/Miles/Sites/build-tool-config/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v59-darwin-x64.tar.gz\nnode-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v59-darwin-x64.tar.gz\nnode-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v59-darwin-x64.tar.gz \nnode-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp) \nnode-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v59-darwin-x64.tar.gz \nnode-pre-gyp ERR! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)\nnode-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/Miles/Sites/build-tool-config/node_modules/watchpack/node_modules/node-pre-gyp/lib/util/compile.js:77:29)\nnode-pre-gyp ERR! stack     at ChildProcess.emit (events.js:159:13)\nnode-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)\nnode-pre-gyp ERR! stack     at onErrorNT (internal/child_process.js:389:16)\nnode-pre-gyp ERR! stack     at process._tickCallback (internal/process/next_tick.js:152:19)\nnode-pre-gyp ERR! System Darwin 17.3.0\nnode-pre-gyp ERR! command \"/usr/local/Cellar/node/9.3.0_1/bin/node\" \"/Users/Miles/Sites[-/5] ⠐ waiting...
[-/5] ⠂ waiting...
[-/5] ⠂ waiting...
[-/5] ⠄ waiting...
[-/5] ⠄ waiting...
^C/5] ⠄ weak

Aucune quantité de restaurations, de réinstallations, de reconstructions et de changements de version n'a résolu le problÚme.

Salut! J'ai donc dû installer notre repo sur un nouvel ordinateur portable et c'est ce qui a fonctionné pour moi.

J'ai installé du fil en utilisant Homebrew
Sur mon ordinateur portable, je lance :
node: 9.5.0
yarn: 1.3.2

J'ai essayĂ© d'exĂ©cuter l'installation de fil et j'ai obtenu la mĂȘme erreur que tout le monde a collĂ©e ci-dessus. J'ai ensuite supprimĂ© les modules de nƓud dans le rĂ©fĂ©rentiel.

Puis couru yarn add fsevents qui a installé ^1.1.3 directement
Puis couru yarn install nouveau semblait penser que tout Ă©tait Ă  jour et tous les modules de nƓuds sont rĂ©apparus.

Ensuite, notre projet s'est compilé et s'est exécuté comme prévu. Evidemment pas idéal mais ça a marché.

Dans le cas oĂč vous dĂ©veloppez sur un Mac mais que vous construisez/exĂ©cutez ou un Linux, l'ajout de la version 1.1.3 directement au optionalDependencies rĂ©soudra le problĂšme.

Laissez ceci ici, juste au cas oĂč cela pourrait aider quelqu'un :
https://github.com/nodejs/node-gyp/issues/809#issuecomment -473261194

S'il n'y a pas de problĂšme pour tout mettre Ă  niveau, c'est peut-ĂȘtre une ancienne version, essayez yarn upgrade :)

J'ai rencontré cela aprÚs avoir ajouté un nouvel espace de travail - Node : 12.3.1, Yarn : 1.16.0 et Lerna : 3.13.3

La solution pour moi Ă©tait yarn cache clean && yarn

J'ai dû faire une combinaison de plusieurs solutions proposées :

yarn cache clean && yarn upgrade && yarn

Cela a fait l'affaire. J'essayais d'exécuter expo install expo-notifications pour installer une dépendance dans un projet Expo . J'avais déjà supprimé node_modules et exécuté yarn install , mais pour une raison quelconque, des problÚmes persistaient. On dirait que la cache était le coupable.

J'ai rĂ©trogradĂ© ma version de nƓud avec npm install -g [email protected] et ça marche

cache de fil nettoyer && mise Ă  niveau de fil && fil

Merci @squatto. Je viens de passer à la version LTS de Node (10.x -> 12.x) et j'ai eu ce problÚme (également dans un projet Expo) mais votre solution a fonctionné pour moi. ??

Au cas oĂč quelqu'un obtiendrait cette erreur no-xcode-or-clt-version-detected-macos suivez ceci :
https://medium.com/flawless-app-stories/gyp-no-xcode-or-clt-version-detected-macos-catalina-anansewaa-38b536389e8d

Cette page vous a été utile?
0 / 5 - 0 notes