- Ymox,
Bonjour !
Je suis en train de me (re-)prendre la tête avec l’installation de dépendances Node.js, que je connais très peu — au plus je sais utiliser ce qui est utilisé par le projet.
Depuis une mise à jour du repository (remplacé ruby-sass par gulp-sass, mise à jour de Capistrano 1 vers 2), je n’arrive plus à installer les versions requises des dépendances, apparemment à cause de node-sass
. Voici une partie des logs d’installation.
$ npm install
> node-sass@4.9.0 install /var/www/a_project/node_modules/node-sass
> node scripts/install.js
fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EINVAL: invalid argument, open '/var/www/a_project/node_modules/node-sass/package.json'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.Module._extensions..json (module.js:669:20)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/var/www/a_project/node_modules/node-sass/lib/extensions.js:7:9)
at Module._compile (module.js:652:30)
npm WARN rollback Rolling back glob@7.1.2 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/glob'
npm WARN rollback Rolling back minimatch@3.0.4 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/minimatch'
npm WARN rollback Rolling back get-caller-file@1.0.2 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/get-caller-file'
npm WARN rollback Rolling back mime-db@1.33.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/mime-db'
npm WARN rollback Rolling back mime-types@2.1.18 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/mime-types'
npm WARN rollback Rolling back globule@1.2.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/globule'
npm WARN rollback Rolling back hosted-git-info@2.6.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/hosted-git-info'
npm WARN rollback Rolling back ecc-jsbn@0.1.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/ecc-jsbn'
npm WARN rollback Rolling back gaze@1.1.3 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/gaze'
npm WARN rollback Rolling back lodash@4.17.10 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/lodash'
npm WARN rollback Rolling back commander@2.15.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/har-validator/node_modules/commander'
npm WARN rollback Rolling back node-sass@4.9.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/gaze'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.9.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2018-07-30T13_40_30_657Z-debug.log
Dans le fichier de log mentionné à la fin de la commande ci-dessus, j’ai ceci (extrait) :
silly install node-sass@4.9.0
info lifecycle node-sass@4.9.0~install: node-sass@4.9.0
verbose lifecycle node-sass@4.9.0~install: unsafe-perm in lifecycle true
verbose lifecycle node-sass@4.9.0~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/a_project/node_modules/node-sass/node_modules/.bin:/var/www/a_project/node_modules/.bin:/usr/local/rvm/gems/ruby-2.4.1/bin:/usr/local/rvm/gems/ruby-2.4.1@global/bin:/usr/local/rvm/rubies/ruby-2.4.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin:/usr/local/rvm/bin:/home/vagrant/bin
verbose lifecycle node-sass@4.9.0~install: CWD: /var/www/a_project/node_modules/node-sass
silly lifecycle node-sass@4.9.0~install: Args: [ '-c', 'node scripts/install.js' ]
silly lifecycle node-sass@4.9.0~install: Returned: code: 1 signal: null
info lifecycle node-sass@4.9.0~install: Failed to exec install script
timing action:install Completed in 309ms
verbose unlock done using /home/vagrant/.npm/_locks/staging-7792380f2eb16a1b.lock for /var/www/a_project/node_modules/.staging
warn rollback Rolling back glob@7.1.2 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/glob'
warn rollback Rolling back minimatch@3.0.4 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/minimatch'
warn rollback Rolling back get-caller-file@1.0.2 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/get-caller-file'
warn rollback Rolling back mime-db@1.33.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/mime-db'
warn rollback Rolling back mime-types@2.1.18 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/mime-types'
warn rollback Rolling back globule@1.2.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/globule'
warn rollback Rolling back hosted-git-info@2.6.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/hosted-git-info'
warn rollback Rolling back ecc-jsbn@0.1.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/ecc-jsbn'
warn rollback Rolling back gaze@1.1.3 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/gaze'
warn rollback Rolling back lodash@4.17.10 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/lodash'
warn rollback Rolling back commander@2.15.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/har-validator/node_modules/commander'
warn rollback Rolling back node-sass@4.9.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/var/www/a_project/node_modules/node-sass/node_modules/gaze'
Le truc, c’est que à part le fait qu’il y a apparemment un problème de permissions (alors que même avec
node_modules
de vidé, j’ai le même souci), je ne vois absolument pas ce qui gêne. Les dossiers sont créés avec les droits 777, apparemment. Qu’il émette un WARNING, j’aurais compris, mais si c’est à cause de ça qu’il ne veut pas installer node-sass alors qu’il n’a aucun souci pour les autres (sous-)dépendances, ça me dépasse…
Est-ce qu’un dev familier de l’outil pourrait m’aider ?
Merci d’avance