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
pluginsProcess = cp.fork(path.join(__dirname, "child", "index.js"),
["--file", config.pluginsFile], { stdio: "inherit" })
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.coffeewe could find external Node and launch it as a child process
reported issues
node-sassCypress 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 #4202