Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node 16 via snap fails to install puppeteer but it works with .deb node #25

Open
mo opened this issue Nov 14, 2021 · 1 comment
Open

Comments

@mo
Copy link

mo commented Nov 14, 2021

If I install node using sudo snap install node --classic --channel=16 and then run npm install puppeteer then I get this error:

npm ERR! code 1
npm ERR! path /opt/abc/node_modules/puppeteer
npm ERR! command failed
npm ERR! command sh -c node install.js

...however, if I uninstall the snap version and install via .deb package, then everything works. I.e. it works when I install via:

curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
@rvagg
Copy link
Member

rvagg commented Nov 15, 2021

First I'd try messing with PUPPETEER_DOWNLOAD_PATH (setting it explicitly or via npm config set puppeteer_download_path) puppeteer/puppeteer#6014

See https://github.com/puppeteer/puppeteer/blob/7c0a7b92cf98033425b78e1e7a96bb440a636123/src/node/install.ts#L44-L47

But there might be something here related to child_process spawning .. see #13 (comment) .. maybe you can use that to work around the problems here?

Basically we're in a constrained environment with Snaps such that certain novel behaviours become problematic. I wish it weren't so but sometimes you're better off just installing Node.js directly and bypassing the containment environment of Snaps.

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

No branches or pull requests

2 participants