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

Add Yarn Plug'n'Play note to Module API guide #5254

Merged
merged 1 commit into from
May 19, 2023
Merged

Add Yarn Plug'n'Play note to Module API guide #5254

merged 1 commit into from
May 19, 2023

Conversation

MikeMcC399
Copy link
Contributor

@MikeMcC399 MikeMcC399 commented May 18, 2023

This PR resolves #5248. It adds a note for Yarn Plug'n'Play to use yarn node instead of node in the

Module API Guide

Verification

To verify that the instructions are correct:

Execute:

mkdir cy-module-api-pnp
cd cy-module-api-pnp
git init
yarn set version berry
yarn init -y
yarn add [email protected] -D -E
yarn cypress open

Click on E2E Testing
Click on Continue
Select Electron
Click on Start E2E Testing in Electron
Click Create New Spec
Click Create Spec
Click Okay, run the spec
Exit the Cypress App

Create e2e-run-tests.js in root directory of project:

// e2e-run-tests.js
const cypress = require('cypress')

cypress.run()

Execute the following incorrect instruction: node e2e-run-tests.js
note the failure "Error: Cannot find module 'cypress' "

Now execute the correct instruction for Yarn Plug'n'Play:

yarn node e2e-run-tests.js

Cypress completes successfully with "All specs passed!"

@netlify
Copy link

netlify bot commented May 18, 2023

👷 Deploy request for cypress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit e2e238a

@cypress-app-bot
Copy link
Collaborator

@chrisbreiding
Copy link
Contributor

Thanks, @MikeMcC399!

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

Successfully merging this pull request may close these issues.

Module API examples incorrect for Yarn Plug'n'Play
4 participants