-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Allow using external Node when running tasks / plugins #4432
Comments
Finding NodeProject https://github.com/typicode/husky uses to find https://github.com/sindresorhus/run-node I think it would be nice to configure what Node to use from {
"node": "built-in"
} to use Node that comes with the Test Runner. To use specific version of Node (think NVM managing multiple versions) {
"node": "10.2.1"
} or specify minimum version {
"node": "12"
} |
The code for this is done in cypress-io/cypress#4436, but has yet to be released. |
Released in |
Proposal
Currently, the plugins file is executed using the Node.js version included with Cypress Test Runner (like 8.2.1), which is often not the version needed to run the application. The most common problem is the inability to load native extensions when requiring NPM modules from the plugins file. The installed app for example uses Node 10 to compile extensions, while Cypress tries to load them using Node 8
So instead of using built-in Node version in
packages/server/lib/plugins/index.coffee
we could find external Node and launch it as a child process
reported issues
node-sass
Cypress error : Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x #3875 and unable to require node-sass within plugins - can not test svelte file with sass syntax in the style tag #4202The text was updated successfully, but these errors were encountered: