zachleat / glyphhanger

Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
https://www.zachleat.com/web/glyphhanger/
MIT License
748 stars 21 forks source link

npm installation fails on puppeteer install script #4

Closed mekkablue closed 2 years ago

mekkablue commented 3 years ago

Running npm install -g glyphhanger or sudo npm install -g glyphhanger will result in the following deprecation warnings and the ELIFECYCLE error for puppetteer on macOS Catalina 10.15.7:

$ sudo npm install -g glyphhanger
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/local/bin/glyphhanger -> /usr/local/lib/node_modules/glyphhanger/cmd.js

> puppeteer@8.0.0 install /usr/local/lib/node_modules/glyphhanger/node_modules/puppeteer
> node install.js

ERROR: Failed to set up Chromium r856583! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
[Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/glyphhanger/node_modules/puppeteer/.local-chromium'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/usr/local/lib/node_modules/glyphhanger/node_modules/puppeteer/.local-chromium'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@8.0.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the puppeteer@8.0.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!     /Users/mekka/.npm/_logs/2021-05-03T13_50_46_117Z-debug.log
zachleat commented 2 years ago

I just updated the puppeteer dependency from 8 to 12!

(New in glyphhanger 5)

zachleat commented 2 years ago

This is an automated message to let you know that a helpful response was posted to your issue and for the health of the repository issue tracker the issue will be closed. This is to help alleviate issues hanging open waiting for a response from the original poster.

If the response works to solve your problem—great! But if you’re still having problems, do not let the issue’s closing deter you if you have additional questions! Post another comment and we will reopen the issue. Thanks!

monsieurm commented 2 years ago

Hi ! Same error with puppeteer 12 dependency...

sudo npm install -g glyphhanger
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
/usr/local/bin/glyphhanger -> /usr/local/lib/node_modules/glyphhanger/cmd.js

> puppeteer@12.0.1 install /usr/local/lib/node_modules/glyphhanger/node_modules/puppeteer
> node install.js

ERROR: Failed to set up Chromium r938248! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
{ [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/glyphhanger/node_modules/puppeteer/.local-chromium']
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path:
   '/usr/local/lib/node_modules/glyphhanger/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@12.0.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the puppeteer@12.0.1 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!     /Users/mrenaut/.npm/_logs/2022-05-03T08_15_27_937Z-debug.log
monsieurm commented 2 years ago

Ok fine with sudo npm install -g glyphhanger --unsafe-perm