how do i solve plugin error for index.js in cypress

Viewed 969

I am getting following error for Cypress

The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (/home/dev2/Desktop/kavitaSeffcon/CypressProject/cypress/plugins/index.js)

Error: ENOENT: no such file or directory, stat '/initrd.img'

can please suggest exact solution for this error

1 Answers

Alright so during the troubleshoot our goal would be to reach the nearest version of node required as we can see in below error logs.

-bash-3.2$ npm updatenpm WARN old lockfilenpm WARN old lockfile The package-lock.json file was created with an old version of npm,npm WARN old lockfile so supplemental metadata must be fetched from the registry.npm WARN old lockfilenpm WARN old lockfile This is a one-time fix-up, please be patient...npm WARN old lockfilenpm WARN EBADENGINE Unsupported engine {npm WARN EBADENGINE package: undefined,npm WARN EBADENGINE required: { node: '14.17.0' },npm WARN EBADENGINE current: { node: 'v17.2.0', npm: '8.1.0' }npm WARN EBADENGINE }

added 7 packages, removed 6 packages, changed 57 packages, and audited 350 packages in 11s

64 packages are looking for fundingrun npm fund for details

added 7 packages, removed 6 packages, changed 57 packages, and audited 350 packages in 11s

64 packages are looking for funding

  run npm fund for details

As we currently have 17.2.0 and the required is 14.17.0. To fix this

npm cache clearnpm cache clean --forcenpm install -g cypresssudo n 14.17.0rm -rf put your existing version. {Perform this in the folder where your previous version of node was installed}

Open a new terminal

node -v npm installnpx cypress open

Related