删除了节点模块并删除了包装锁文件。之后,尝试进行NPM安装,并导致以下错误。节点版本为16.2.0。运行NPM缓存清洁 - 也可以。
npm err!代码ebadengine
npm err!发动机不受支持的发动机
npm err!引擎与您的节点/npm版本不兼容:
npm err!需要:{“ node”:“ ^12.13.0 || ^14.15.0 || ^16.10.0 ||> = 17.0.0.0”}
npm err! NOTSUP实际:{“ npm”:“ 7.13.0”,“ node”:“ v16.2.0”}
以下是.npmrc文件中的config
引擎 - 图片= true
传统peer-deps = true
甚至尝试卸载开玩笑,但面对相同的错误,
这里是dev依赖性
“ devDectiencies”:{
“@next/bundle-analyzer”:“^12.0.7”,
“@testing-library/jest-dom”:“^5.16.2”,
“@testing-library/react”:“^12.1.2”,
“ autoprefixer”:“^10.2.5”,
“ cross-env”:“^7.0.3”,
“ eslint”:“ 7.28.0”,
“ Eslint-Plugin-react”:“ 7.24.0”,,
“沙哑”:“^7.0.1”,
“开玩笑”:“^26.6.3”,
“绒毛阶段”:“ 11.0.0”,
“ MSW”:“^0.38.1”,
“ Postcss”:“^8.2.15”,
“漂亮”:“^2.4.1”,
“ tailwindcss”:“^2.1.2”
}
Deleted the node modules and dropped the package-lock file. After that try to do npm install and it results in the below error. Node version is 16.2.0. Ran npm cache clean --force as well.
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Required: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"}
npm ERR! notsup Actual: {"npm":"7.13.0","node":"v16.2.0"}
Following is the config in .npmrc file
engine-strict=true
legacy-peer-deps=true
Even tried uninstalling jest but was faced with the same error
Here is the dev dependency
"devDependencies": {
"@next/bundle-analyzer": "^12.0.7",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.2",
"autoprefixer": "^10.2.5",
"cross-env": "^7.0.3",
"eslint": "7.28.0",
"eslint-plugin-react": "7.24.0",
"husky": "^7.0.1",
"jest": "^26.6.3",
"lint-staged": "11.0.0",
"msw": "^0.38.1",
"postcss": "^8.2.15",
"prettier": "^2.4.1",
"tailwindcss": "^2.1.2"
}
发布评论