当我部署到circle时,生成错误(版本错误)



情况

  • 当我部署到圆形ci

我试过

  • 我确实删除了node_modules和packcage.lock.json,从package.json中删除了lint,并手动重新安装了node,但这并不能解决问题。而不是出现其他问题

这是我的回购

错误

There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

"eslint": "^6.6.0"

Don't try to install it manually: your package manager does it automatically.
However, a different version of eslint was detected higher up in the tree:

/home/circleci/repo/node_modules/eslint (version: 7.12.1) 

Manually installing incompatible versions is known to cause hard-to-debug issues.

If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to a .env file in your project.
That will permanently disable this message but you might encounter other issues.

最后,我解决了这个问题。

这个问题是我忘了卸载yarn.lock只是卸载了package-lock.json

的解决方法

1.删除package-lock.json和yarn.lock

2.卸载npm和纱线

3.纱线去除eslint

4.安装npm

5.纱线添加-D eslint

6位推送

最新更新