Bonjour,
J'ai une question toute bête. Je veux changer le couleur de l'icône de livereload sur Chrome. J'ai donc trouvé le dossier correspondant dans le dossier d'extensions de Chrome mais lorsque je modifie la couleur de l'icône IconEnabled.png et IconActive.png, le plugin plante. Un message me dit que l'extension est endommagée et me propose de la réparer, j'accepte, alors il remplace les png par les originaux.
Étrange insn't it ?!
Quelqu'un saurait-il pourquoi ?
Oui, merci de ton conseil mais je n'arrive pas a installer Browser Sync sur mon Mac. J'obtiens invariablement une liste d'erreur de 3 km :
MBP-Fabrice:~ fabricechapot$ npm install -g browser sync
> fibers@1.0.7 install /usr/local/lib/node_modules/sync/node_modules/fibers
> node build.js || nodejs build.js
gyp: /Users/fabricechapot/.node-gyp/4.0.0/common.gypi not found (cwd: /usr/local/lib/node_modules/sync/node_modules/fibers) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:357:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /usr/local/lib/node_modules/sync/node_modules/fibers
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
Build failed
sh: nodejs: command not found
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "browser" "sync"
npm ERR! node v4.0.0
npm ERR! npm v2.14.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@1.0.7 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers@1.0.7 install script 'node build.js || nodejs build.js'.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js || nodejs build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/fabricechapot/npm-debug.log
Je ne comprends pas tout, j'ai fait la manip qui consiste à autoriser le dassier npm dans le répertoire /usr/local/ mais ça ne change rien. Du coup Live Reload regagne facilement des points :)
Le problème vient sûrement de node-gyp qui n'est pas installé. Fais un node install -g node-gyp
et retente npm install -g browser sync
.
edit: node install -g node-gyp
==> npm install -g node-gyp
Merci de ton aide. Voici ce que j'obtiens avec la commande node install -g node-gyp
module.js:338
throw err;
^
Error: Cannot find module '/Users/fabricechapot/install'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:117:18)
at node.js:951:3
Là, l'install de npm a fonctionné, mais pas la suite. L'install de Browser Sync donne ça :
MBP-Fabrice:~ fabricechapot$ npm install -g browser sync
> fibers@1.0.7 install /usr/local/lib/node_modules/sync/node_modules/fibers
> node build.js || nodejs build.js
gyp: /Users/fabricechapot/.node-gyp/4.0.0/common.gypi not found (cwd: /usr/local/lib/node_modules/sync/node_modules/fibers) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:357:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /usr/local/lib/node_modules/sync/node_modules/fibers
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
Build failed
sh: nodejs: command not found
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "browser" "sync"
npm ERR! node v4.0.0
npm ERR! npm v2.14.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@1.0.7 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers@1.0.7 install script 'node build.js || nodejs build.js'.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js || nodejs build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/fabricechapot/npm-debug.log
MBP-Fabrice:~ fabricechapot$
Sur mac c'est comme sur linux on doit prefixé le npm install -g d'un sudo pour l'executer en super admim.
npm install -g browser sync
devient
sudo npm install -g browser sync
Merci Defy de te joindre à cette discution. Il y a une video qui explique comment modifier les permissions sur Mac pour installer correctement des modules avec npm. Malgré ça, et même avec ta méthode, j'ai toujours une tone d'erreur sur mon install…
MBP-Fabrice:~ fabricechapot$ sudo npm install -g browser sync
Password:
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "browser" "sync"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help conf
Npm te donne ici une aide précieuse:
This is most likely not a problem with npm itself and is related to network connectivity.
In most cases you are behind a proxy or have bad network settings.
If you are behind a proxy, please make sure that the 'proxy' config is set properly. See: 'npm help conf
As-tu regardé de ce côté?