[英]how do i solve plugin error for index.js in cypress
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)
请检查您的插件文件(/home/dev2/Desktop/kavitaSeffcon/CypressProject/cypress/plugins/index.js)
Error: ENOENT: no such file or directory, stat '/initrd.img'错误:ENOENT:没有这样的文件或目录,stat '/initrd.img'
can please suggest exact solution for this error可以请为此错误建议确切的解决方案
I have installed Cypress 9.1.0 and faced the same issue today.我已经安装了 Cypress 9.1.0,今天遇到了同样的问题。 Can you please specify what is your Cypress version?
你能指定你的赛普拉斯版本是什么吗?
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 } -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当前:{节点:'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 11s新增7个包,删除6个包,改57个包,审核350个包
64 packages are looking for fundingrun npm fund for details 64包正在寻找资金运行npm基金详情
added 7 packages, removed 6 packages, changed 57 packages, and audited 350 packages in 11s 11s新增7个包,删除6个包,改57个包,审核350个包
64 packages are looking for funding 64个包正在寻找资金
run npm fund
for details运行
npm fund
了解详情
As we currently have 17.2.0 and the required is 14.17.0.因为我们目前有 17.2.0,需要的是 14.17.0。 To fix this
要解决这个问题
npm cache clearnpm cache clean --forcenpm install -g cypresssudo n 14.17.0rm -rf put your existing version . npm cache clearnpm cache clean --forcenpm install -g cypresssudo n 14.17.0rm -rf把你现有的版本。 {Perform this in the folder where your previous version of node was installed}
{在安装了以前版本节点的文件夹中执行此操作}
Open a new terminal打开一个新的终端
node -v npm installnpx cypress open node -v npm installnpx cypress open
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.