Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Installation currently not possible #73

Open
mekkablue opened this issue Dec 11, 2019 · 2 comments
Open

Installation currently not possible #73

mekkablue opened this issue Dec 11, 2019 · 2 comments

Comments

@mekkablue
Copy link

Related to #66 and #70

But it seems to have become more serious. Currently, you cannot install glyphhanger on macOS (10.14.6) because of puppeteer:

$ sudo npm install -g glyphhanger
/usr/local/bin/glyphhanger -> /usr/local/lib/node_modules/glyphhanger/cmd.js

> [email protected] install /usr/local/lib/node_modules/glyphhanger/node_modules/puppeteer
> node install.js

ERROR: Failed to download Chromium r686378! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/glyphhanger/node_modules/puppeteer/.local-chromium'
  -- ASYNC --
    at BrowserFetcher.<anonymous> (/usr/local/lib/node_modules/glyphhanger/node_modules/puppeteer/lib/helper.js:111:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/glyphhanger/node_modules/puppeteer/install.js:64:16)
    at Module._compile (internal/modules/cjs/loader.js:1128:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:983:32)
    at Function.Module._load (internal/modules/cjs/loader.js:891:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  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! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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/rainerscheichelbauer/.npm/_logs/2019-12-11T10_08_49_396Z-debug.log
@mekkablue
Copy link
Author

mekkablue commented Dec 11, 2019

In the puppeteer repo, this was brought up as a possible solution:

sudo npm install -g puppeteer --unsafe-perm=true --allow-root

Florian Brinkmann suggests the same for the glyphhanger installation. I needed to prepend it with sudo to make it work, though:

sudo npm install -g glyphhanger --unsafe-perm=true --allow-root

This seems to work. I suggest to update the installation instructions accordingly.

@DanielRuf
Copy link

sudo should never be used. Apple has increased the security so to specific paths can not be written by default. It should work with nvm, nodenv and so on.

There are better solutions like chowning the needed paths.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants