Closed MikeMcC399 closed 2 months ago
Sounds fine to document for now.
@jennifer-shehane
Sounds fine to document for now.
It will be a while until I get around to this. I hope there will be some feedback soon from the Node.js snap folks to understand the root cause and who could fix it. For the moment I just wanted to document the issue so there is a place to add any new facts.
Ubuntu 22.04.4
LTS
snap install node --classic --channel=20
echo node version $(node -v)
echo npm version $(npm -v)
rm -rf ~/.cache/Cypress
mkdir cy-snap-test
cd cy-snap-test
npm install cypress --save-dev --foreground-scripts
npx cypress verify
$ snap install node --classic --channel=20
echo node version $(node -v)
echo npm version $(npm -v)
rm -rf ~/.cache/Cypress
mkdir cy-snap-test
cd cy-snap-test
npm install cypress --save-dev --foreground-scripts
npx cypress verify
node (20/stable) 20.15.1 from OpenJS Foundation (iojs✓) installed
node version v20.15.1
npm version 10.7.0
> cypress@13.13.0 postinstall
> node index.js --exec install
Installing Cypress (version: 13.13.0)
✔ Downloaded Cypress
✔ Unzipped Cypress
✔ Finished Installation /home/mike/.cache/Cypress/13.13.0
You can now open Cypress by running: node_modules/.bin/cypress open
https://on.cypress.io/installing-cypress
added 173 packages in 37s
39 packages are looking for funding
run `npm fund` for details
✔ Verified Cypress! /home/mike/.cache/Cypress/13.13.0/Cypress
@jennifer-shehane
Sounds fine to document for now.
snaps have trouble doing child process execs because they are already executed in constrained environments
There wasn't any indication that the snap folks would look at resolving the Cypress installation issue in this environment, so there is no timeline at all for a resolution. It therefore makes sense to document the workaround.
Subject
Guides https://docs.cypress.io/guides/getting-started/installing-cypress#npm-install
Description
If an attempt is made to install Cypress on Ubuntu using npm that has been installed via snap Node.js, then it fails to install the Cypress binary.
For example:
Typical log lines include output similar to the following:
If this is an on-going restriction, then it may need to be documented here. A workaround is to use:
Yarn is not affected. The following works correctly: