Unable to Deploy to Netlify After Upgrade - npm ERR! code ERESOLVE
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: sanity-eleventy-blog-studio@1.0.12
npm ERR! Found: @sanity/base@2.30.1
npm ERR! node_modules/@sanity/base
npm ERR! @sanity/base@"^2.30.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @sanity/base@"^1" from sanity-plugin-dashboard-widget-document-list@0.0.11
npm ERR! node_modules/sanity-plugin-dashboard-widget-document-list
npm ERR! sanity-plugin-dashboard-widget-document-list@"^0.0.11" from the root projectnpm upgrade --legacy-peer-deps, after that,
/studiolooks like this:
{
"private": true,
"name": "sanity-eleventy-blog-studio",
"version": "1.0.12",
"main": "package.json",
"author": "Sanity <hello@sanity.io>",
"scripts": {
"dev": "sanity start",
"format": "prettier-eslint --write \"**/*.js\" \"!node_modules/**\"",
"build": "sanity build",
"graphql-deploy": "sanity graphql deploy --playground",
"lint": "eslint .",
"test": "sanity check"
},
"dependencies": {
"@sanity/base": "^2.30.1",
"@sanity/cli": "^2.30.2",
"@sanity/components": "^2.14.0",
"@sanity/core": "^2.30.2",
"@sanity/dashboard": "^2.30.1",
"@sanity/default-layout": "^2.30.1",
"@sanity/default-login": "^2.30.1",
"@sanity/desk-tool": "^2.30.1",
"date-fns": "^1.30.1",
"prop-types": "^15.7.2",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-icons": "^3.11.0",
"sanity-plugin-dashboard-widget-document-list": "^0.0.11",
"sanity-plugin-dashboard-widget-netlify": "^1.0.1",
"styled-components": "^5.3.5"
},
"devDependencies": {
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-config-standard-react": "^7.0.2",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-react": "^7.13.0",
"eslint-plugin-standard": "^4.0.0",
"prettier-eslint-cli": "^4.7.1"
}
}.npmrcfile with:
legacy-peer-deps=true "engines": {
"node": "16.x",
"npm": "7"
},Was this answer helpful?
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.