Tsd: `tsd install` échoue parfois avec l'erreur : ENOENT sur un fichier cache

Créé le 3 sept. 2015  ·  7Commentaires  ·  Source: DefinitelyTyped/tsd

Parfois, notre build quotidienne échoue avec une erreur ENOENT. tsd essaie d'ouvrir un fichier cache, qui n'existe pas.

[ERR!] Erreur : ENOENT, ouvrez 'C:\Users***\AppData\Roaming\tsd-cache\borisyankov-DefinitelyTyped\git-raw-fmt1.0\fa\fac3185ed76eb7238c79967983952cc5224e8d36.raw'

Dans package.json, nous avons ajouté la commande "./node_modules/.bin/tsd install" pour s'exécuter automatiquement après npm-install.

tsd-debug.log :
[ERR!] cwd :c: *[ERR!] os : Windows_NT 6.2.9200[ERR!] argv : "node" "c:* _node_modules\tsd\build\cli.js" "install"[ERR!] nœud : v0.10.33[ERR!] tsd : 0.6.4[ERR!] Erreur : ENOENT, ouvrez 'C:\Users* _\AppData\Roaming\tsd-cache\borisyankov-DefinitelyTyped\git-raw-fmt1.0\fa\fac3185ed76eb7238c79967983952cc5224e8d36.raw'[ERR!] CODE : ENOENT[ERR!] ENOENT, ouvrez 'C:\Users* \AppData\Roaming\tsd-cache\borisyankov-DefinitelyTyped\git-raw-fmt1.0\fa\fac3185ed76eb7238c79967983952cc5224e8d36.raw'
Ce n'est probablement pas un problème avec tsd lui-même
et est lié au fait que tsd ne parvient pas à trouver un fichier.

[SE TROMPER!]
Erreur : ENOENT, ouvrez 'C:\Users***\AppData\Roaming\tsd-cache\borisyankov-DefinitelyTyped\git-raw-fmt1.0\fa\fac3185ed76eb7238c79967983952cc5224e8d36.raw'

[ERR !] tsd.json : {"version":"v4","repo":"borisyankov/DefinitelyTyped","ref":"master","path":"typings","bundle":"typings/ tsd.d.ts","installed":{"jquery/jquery.d.ts":{"commit":"0de1592ef9e3144b925287ca0494f621e12b01c6"},"angularjs/angular.d.ts":{"commit":"76e1dedf0bada455c0bd3abeec32a" },"angularjs/angular-route.d.ts":{"commit":"76e1dedf0bada455c0b75abeec3206d3aa5bd892"},"requirejs/require.d.ts":{"commit":"76e1dedf0bada455c0b75abeecreadydom.dy"}domb,"requirejs/require.d.ts":{"commit":"76e1dedf0bada455c0b75abeecreadydom.dy"}domb," .ts":{"commit":"76e1dedf0bada455c0b75abeec3206d3aa5bd892"},"modernizr/modernizr.d.ts":{"commit":"f6c8ca47193fb67947944a3170912672ac3e908e"},"angular-ui-router/rangular " :{"commit":"53439c5a40339b54d926b32e51c738b69b83660d"},"angular-translate/angular-translate.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},".ova-ionic/cordova-ionic/": {"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova-ionic/plugins/keyboard.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cor dova/cordova.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova/plugins/Camera.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb",04651c"} ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova/plugins/FileTransfer.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"}"},"cordova/plugins": ":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova/plugins/Splashscreen.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova/plugins/53"d.commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova/plugins/53"d. ,"cordova/plugins/Contacts.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova/plugins/Media.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b1e4}fb0465,"cordova/plugins/Media.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b1e4}"fb0465," StatusBar.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova/plugins/NetworkInformation.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordovat":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"Dovat :{"commit":"38fb591 c6eba840e0b53d1110302b8e4fb04651c "}," cordova / plugins / Vibration.d.ts ": {" commit ":" 38fb591c6eba840e0b53d1110302b8e4fb04651c "}," cordova / plugins / Vibration.d.ts ": {" commit ":" 38fb591c6eba840e0b53d1110302b8e4fb04651c "}," cordova / plugins / Vibration.d.ts ": {" commit ") /plugins/DeviceOrientation.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova/plugins/Push.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e"}.cordd,"lobova1c/lobova1c .ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova/plugins/WebSQL.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb.04651c"},"cordova/Status": commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"},"cordova/plugins/InAppBrowser.d.ts":{"commit":"38fb591c6eba840e0b53d1110302b8e4fb04651c"}}}

[ERR!] .tsdrc n'a pas pu être récupéré

bug

Commentaire le plus utile

Je recommande fortement de ne pas utiliser tsd à ce stade. Les types sont désormais publiés sur npm sous l'espace @types noms

Tous les 7 commentaires

Salut @L6Echo Merci d'avoir signalé ce problème. Je vais étudier et essayer de reproduire le problème.

Nous avons récemment rencontré quelque chose de similaire à cela. Utiliser également un script npm pour lancer notre tsd reinstall afin de s'assurer que toutes les dépendances sont en place avant la compilation.

Voici le résultat de notre serveur de build :

> tsd reinstall


-> running reinstall
[ERR!] cwd  : c:\j\vNext Dev Deploy\Foo.Web
[ERR!] os   : Windows_NT 6.3.9600
[ERR!] argv : "node" "c:\\j\\vNext Dev Deploy\\Foo.Web\\node_modules\\tsd\\build\\cli.js" "reinstall"
[ERR!] node : v0.12.4
[ERR!] tsd  : 0.6.5
[ERR!] Error: path exists but is not a directory C:\Users\jenkins\AppData\Roaming\tsd-cache\borisyankov-DefinitelyTyped\git-raw-fmt1.0\51
[ERR!] CODE : undefined
[ERR!] path exists but is not a directory C:\Users\jenkins\AppData\Roaming\tsd-cache\borisyankov-DefinitelyTyped\git-raw-fmt1.0\51
[ERR!] If you need help, you may report this error at:
    https://github.com/DefinitelyTyped/tsd/issues

[ERR!] .tsdrc could not be retrieved

[ERR!] Please include the following file with any support request:
    c:\j\vNext Dev Deploy\Foo.Web\tsd-debug.log


npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "tsd:install"
npm ERR! node v0.12.7
npm ERR! npm  v2.14.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] tsd:install: `tsd reinstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] tsd:install script 'tsd reinstall'.
npm ERR! This is most likely a problem with the Foo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsd reinstall
npm ERR! You can get their info via:
npm ERR!     npm owner ls Foo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     c:\j\vNext Dev Deploy\Foo.Web\npm-debug.log

Cela arrive assez régulièrement sur notre serveur CI (jenkins). Nous obtenons le même résultat que @jwcarroll.

Juste pour ajouter un autre point de données, nous en faisons également l'expérience lors de notre processus de déploiement. Nous avons commencé à utiliser TSD il y a environ une ou deux semaines et cela s'est produit sur trois de nos versions nocturnes. Cependant, lorsque je me connecte à la machine de construction et que j'exécute le même "/usr/bin/nodejs /[path-to-project]/node_modules/.bin/tsd install" à partir du même répertoire pour essayer de le diagnostiquer, je ne peux pas reproduire il et tsd a bien fonctionné.

[ERR!] cwd  : /[path-to-project]
[ERR!] os   : Linux 3.2.0-67-virtual
[ERR!] argv : "/usr/bin/nodejs" "/[path-to-project]/node_modules/.bin/tsd" "install"
[ERR!] node : v4.2.3
[ERR!] tsd  : 0.6.5
[ERR!] Error: ENOENT: no such file or directory, open '/root/.tsd-cache/DefinitelyTyped-DefinitelyTyped/git-raw-fmt1.0/a0/a01aa4eefc1319b5e8fcd210aa759ff041e23d90.raw'
[ERR!] CODE : ENOENT
[ERR!] ENOENT: no such file or directory, open '/root/.tsd-cache/DefinitelyTyped-DefinitelyTyped/git-raw-fmt1.0/a0/a01aa4eefc1319b5e8fcd210aa759ff041e23d90.raw'
This is most likely not a problem with tsd itself
and is related to tsd not being able to find a file.

[ERR!]
Error: ENOENT: no such file or directory, open '/root/.tsd-cache/DefinitelyTyped-DefinitelyTyped/git-raw-fmt1.0/a0/a01aa4eefc1319b5e8fcd210aa759ff041e23d90.raw'
    at Error (native)

[ERR!] tsd.json: {"version":"v4","repo":"DefinitelyTyped/DefinitelyTyped","ref":"master","path":"typings","bundle":"typings/tsd.d.ts","installed":{"jquery/jquery.d.ts":{"commit":"ba424f7ee39717d51c17699a09ac8df312a7e9a1"},"chosen/chosen.jquery.d.ts":{"commit":"52b0ea5c9719831eecf6ba7436660e30061a4b3c"},"core-js/core-js.d.ts":{"commit":"d0adccc436197cc7c3559322721e9df86b892bd6"},"moment/moment.d.ts":{"commit":"d28dd90af5a7ba2b4f18b107ddba3321a5a1f629"},"moment/moment-node.d.ts":{"commit":"d28dd90af5a7ba2b4f18b107ddba3321a5a1f629"},"fullCalendar/fullCalendar.d.ts":{"commit":"d28dd90af5a7ba2b4f18b107ddba3321a5a1f629"},"node/node.d.ts":{"commit":"b9a05cb4c96ae9961bbc41fbd7df9105c3b8fbd0"},"browserify/browserify.d.ts":{"commit":"b9a05cb4c96ae9961bbc41fbd7df9105c3b8fbd0"},"glob/glob.d.ts":{"commit":"b9a05cb4c96ae9961bbc41fbd7df9105c3b8fbd0"},"minimatch/minimatch.d.ts":{"commit":"b9a05cb4c96ae9961bbc41fbd7df9105c3b8fbd0"},"jsdom/jsdom.d.ts":{"commit":"b9a05cb4c96ae9961bbc41fbd7df9105c3b8fbd0"},"react/react.d.ts":{"commit":"b9a05cb4c96ae9961bbc41fbd7df9105c3b8fbd0"},"webpack/webpack.d.ts":{"commit":"ba424f7ee39717d51c17699a09ac8df312a7e9a1"}}}

[ERR!] .tsdrc could not be retrieved

[ERR!] Please include the following file with any support request:
    /[path-to-project]/tsd-debug.log

Je vois également ce problème environ une fois par semaine sur notre serveur Jenkins. Nous exploitons tsd via le plugin gulp-tsd. Ne voyez jamais ce problème sur les machines de développement. Il peut échouer avec le code ENOENT ou avec un autre problème lié au fichier. Lorsque je cherche le fichier incriminé, il est clairement là, ce qui me porte à croire qu'il s'agit peut-être d'un problème de lecture de fichier asynchrone. La suppression de l'intégralité du cache tsd résout le problème pendant un certain temps, puis il semble revenir.

  [12:55:08] Using gulpfile D:\ws\project\web\gulpfile.js
  [12:55:08] Starting 'tsd'...
  [12:55:12] [gulp-tsd] execute command: reinstall
  [12:55:12] [gulp-tsd] config: ./tsd.json
  [12:55:12] [gulp-tsd] latest: undefined
  [12:55:12] [gulp-tsd] running...

  ---
  path exists but is not a directory C:\Users\$buildmaster722\AppData\Roaming\tsd-cache\DefinitelyTyped-DefinitelyTyped\git-raw-fmt1.0\53
  D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\async.js:93
                  throw res.e;
                  ^

EXEC : error : path exists but is not a directory C:\Users\$buildmaster722\AppData\Roaming\tsd-cache\DefinitelyTyped-DefinitelyTyped\git-raw-fmt1.0\53 [D:\ws\project\Build.xml]
      at D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\build\xm\fileIO.js:117:28
      at tryCatch1 (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\util.js:63:19)
      at Promise$_callHandler [as _callHandler] (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\promise.js:695:13)
      at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\promise.js:711:18)
      at Promise$_settlePromiseAt [as _settlePromiseAt] (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\promise.js:868:14)
      at Promise$_settlePromises [as _settlePromises] (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\promise.js:1006:14)
      at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\async.js:74:12)
      at Async$consumeFunctionBuffer (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\async.js:37:14)
      at doNTCallback0 (node.js:407:9)
      at process._tickCallback (node.js:336:13)
D:\ws\project\Build.xml(69,3): error MSB3073: The command "gulp build" exited with code 1.
EXEC : error : path exists but is not a directory C:\Users\$buildmaster722\AppData\Roaming\tsd-cache\DefinitelyTyped-DefinitelyTyped\git-raw-fmt1.0\53 [D:\ws\project\Build.xml]
      at D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\build\xm\fileIO.js:117:28
      at tryCatch1 (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\util.js:63:19)
      at Promise$_callHandler [as _callHandler] (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\promise.js:695:13)
      at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\promise.js:711:18)
      at Promise$_settlePromiseAt [as _settlePromiseAt] (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\promise.js:868:14)
      at Promise$_settlePromises [as _settlePromises] (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\promise.js:1006:14)
      at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\async.js:74:12)
      at Async$consumeFunctionBuffer (D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\async.js:37:14)
      at doNTCallback0 (node.js:407:9)
      at process._tickCallback (node.js:336:13)
D:\ws\project\Build.xml(69,3): error MSB3073: The command "gulp build" exited with code 1.

[10:39:43] Using gulpfile D:\ws\project\web\gulpfile.js
  [10:39:43] Starting 'tsd'...
  [10:39:45] [gulp-tsd] execute command: reinstall
  [10:39:45] [gulp-tsd] config: ./tsd.json
  [10:39:46] [gulp-tsd] latest: undefined
  [10:39:46] [gulp-tsd] running...
  ---
  ENOENT: no such file or directory, open 'C:\Users\$buildmaster722\AppData\Roaming\tsd-cache\DefinitelyTyped-DefinitelyTyped\git-raw-fmt1.0\d7\d70d12a88d7a6b3f711dadb0fde5b3387c0a860e.raw'
  D:\ws\project\web\node_modules\gulp-tsd\node_modules\tsd\node_modules\bluebird\js\main\async.js:93
                  throw res.e;
                  ^

EXEC : error : ENOENT: no such file or directory, open 'C:\Users\$buildmaster722\AppData\Roaming\tsd-cache\DefinitelyTyped-DefinitelyTyped\git-raw-fmt1.0\d7\d70d12a88d7a6b3f711dadb0fde5b3387c0a860e.raw' [D:\ws\project\build.xml]
      at Error (native)

de nouvelles idées sur cette affaire? j'obtiens la même erreur

12:26:46 [FrontEnd] Erreur : Impossible de stat "/home/jenkins/.tsd-cache/borisyankov-DefinitelyTyped/git-raw-fmt1.0/58/585e78ba1ed6a3b9d25722f40429c3ba934ea79d.json": Erreur : ENOENT : aucun tel fichier ou répertoire, stat '/home/jenkins/.tsd-cache/borisyankov-DefinitelyTyped/git-raw-fmt1.0/58/585e78ba1ed6a3b9d25722f40429c3ba934ea79d.json'

mais le fichier existe

# stat /home/jenkins/.tsd-cache/borisyankov-DefinitelyTyped/git-raw-fmt1.0/58/585e78ba1ed6a3b9d25722f40429c3ba934ea79d.json File: ‘/home/jenkins/.tsd-cache/borisyankov-DefinitelyTyped/git-raw-fmt1.0/58/585e78ba1ed6a3b9d25722f40429c3ba934ea79d.json’ Size: 501 Blocks: 8 IO Block: 4096 regular file Device: fd00h/64768d Inode: 4485381 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1002/ jenkins) Gid: ( 1002/ jenkins) Context: unconfined_u:object_r:user_home_t:s0 Access: 2019-02-21 13:08:24.000000000 +0100 Modify: 2019-02-20 14:25:54.000000000 +0100 Change: 2019-02-21 13:08:24.838670651 +0100 Birth: -

Je recommande fortement de ne pas utiliser tsd à ce stade. Les types sont désormais publiés sur npm sous l'espace @types noms

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

Questions connexes

lazlojuly picture lazlojuly  ·  9Commentaires

Diullei picture Diullei  ·  70Commentaires

blakeembrey picture blakeembrey  ·  15Commentaires

ghost picture ghost  ·  34Commentaires

mattrobenolt picture mattrobenolt  ·  18Commentaires