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

docs: convert $(npm bin) in examples to npx #714

Merged
merged 4 commits into from
Aug 14, 2023

Conversation

MikeMcC399
Copy link
Contributor

@MikeMcC399 MikeMcC399 commented Jul 24, 2023

This PR converts several documentation-only CI example instances which were using $(npm bin) to use instead npx. The $(npm bin) method is no longer available in Node.js 18 used by this repo. The equivalent is npx and npm exec.

$(npm bin) was being used to execute cypress and print-env.

There is no environment set up to test the changed CI examples. The changes are "best effort" to improve the chance that the examples would work if used.

Background

  • This repo is based on using Node.js 18 as defined in .node-version
  • Node.js 18 includes npm version 9 (see Node.js version overview).
  • For npm version 9.x or higher, the command npm bin has been removed. The replacement for npm bin is npx and npm exec to execute binaries. (See npm v9.0.0 released Oct 24, 2022).
  • Thus npm bin is not available in connection with this repo and should be replaced.

@cypress-app-bot
Copy link
Collaborator

@MikeMcC399 MikeMcC399 marked this pull request as ready for review July 24, 2023 13:44
@MikeMcC399
Copy link
Contributor Author

@astone123 Please review or perhaps you can nominate a substitute?

@MikeMcC399
Copy link
Contributor Author

@nagash77

I wanted to refer somebody to the GitLab workflow example today, which was a bit awkward knowing that it is broken. I told him it doesn't work 100% (pending merge of this PR).

Could we get this documentation PR merged please? None of the workflows are active, so there is zero risk of the PR breaking anything in the repo (apart from the fact that all checks have passed in any case).

@jaffrepaul jaffrepaul merged commit abc8b99 into cypress-io:master Aug 14, 2023
1 check passed
@MikeMcC399 MikeMcC399 deleted the npm-bin-to-npx branch August 14, 2023 15:59
@cypress-app-bot
Copy link
Collaborator

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

MikeMcC399 added a commit to MikeMcC399/cypress-example-kitchensink that referenced this pull request Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants