sanity-io/sanity-plugin-dashboard-widget-netlify

Not compatible with the new Sanity v3.41

Opened this issue · 3 comments

I have the following in the Studio package.json. Everything can install without error, but when I run 'npm i sanity-plugin-dashboard-widget-netlify', it gives me some errors. I remember there was no issue with slightly older Sanity (< v3.37).

"dependencies": {
    "@sanity/dashboard": "^3.1.6",
    "@sanity/orderable-document-list": "^1.2.1",
    "@sanity/vision": "^3.41.1",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-icons": "^5.2.1",
    "sanity": "^3.41.1",
    "styled-components": "^6.1.11"
  },
  "devDependencies": {
    "@sanity/eslint-config-studio": "^4.0.0",
    "eslint": "^9.2.0",
    "prettier": "^3.2.5",
    "typescript": "^5.4.2"
  },

Errors:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: dev-studio@1.0.0
npm ERR! Found: styled-components@6.1.11
npm ERR! node_modules/styled-components
npm ERR!   styled-components@"^6.1.11" from the root project
npm ERR!   peer styled-components@"^5.2 || ^6.0.0" from @sanity/dashboard@3.1.6
npm ERR!   node_modules/@sanity/dashboard
npm ERR!     @sanity/dashboard@"^3.1.6" from the root project
npm ERR!     peer @sanity/dashboard@"^3.0.0" from sanity-plugin-dashboard-widget-netlify@2.0.1
npm ERR!     node_modules/sanity-plugin-dashboard-widget-netlify
npm ERR!       sanity-plugin-dashboard-widget-netlify@"*" from the root project
npm ERR!   1 more (sanity)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer styled-components@"^5.2" from sanity-plugin-dashboard-widget-netlify@2.0.1
npm ERR! node_modules/sanity-plugin-dashboard-widget-netlify
npm ERR!   sanity-plugin-dashboard-widget-netlify@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

This dependency hasn't been updated for more than a year, which I assume is the issue because other dependencies keep updating, like sanity and styled-components (v5->v6). Is there a way I can keep using this widget with up to date everything else? Is there an alternative tool for Gatsby/Sanity projects hosted on Netlify?

If this plugin no longer maintained by the Sanity team?

I am experiencing the same issue and haven't been able to find a workaround either. If anyone has any information or suggestions, I would greatly appreciate it. 🙏

@violeta-p the workaround is --legacy-peer-deps