T
TanStack2y ago
ratty-blush

is there any peer dependency for old projects?

I want to install react-query in one project from my work. It's using gatsby 4.2 , nodejs 20, and typescript 5.0, but we are not using latest babel/eslint/etc versions. So I had problems installing react-query-devtools. This library would work fine without the devtools? We're planning to update all our dependencies from this project but in the next 4-6 months. But we want to switch to react-query from now. Any ideas?
7 Replies
rising-crimson
rising-crimson2y ago
what problems ?
ratty-blush
ratty-blushOP2y ago
I'm gonna paste our deps/devDepends what throws errors after installing react-query-devtools, thanks
unwilling-turquoise
unwilling-turquoise2y ago
Are you installing react-query or tanstack query?
metropolitan-bronze
metropolitan-bronze2y ago
tanstack-query
"dependencies": {
"@radix-ui/react-navigation-menu": "^1.1.2",
"@sentry/gatsby": "^7.36.0",
"@tanstack/react-query": "^5.24.1",
"@tanstack/react-query-devtools": "^5.24.1",
"axios": "^1.1.3",
"class-variance-authority": "^0.7.0",
"classnames": "^2.3.2",
"crypto-js": "^4.1.1",
"gatsby": "^4.25.6",
"gatsby-plugin-advanced-sitemap": "^2.1.0",
"gatsby-plugin-anchor-links": "^1.2.1",
"gatsby-plugin-client-side-redirect": "^1.1.0",
"gatsby-plugin-google-analytics": "^4.24.0",
"gatsby-plugin-google-tagmanager": "^4.25.0",
"gatsby-plugin-hotjar": "^1.1.1",
"gatsby-plugin-image": "^2.24.0",
"gatsby-plugin-mdx": "^4.3.0",
"gatsby-plugin-robots-txt": "1.7.1",
"gatsby-plugin-sharp": "^4.24.0",
"gatsby-plugin-smoothscroll": "^1.2.0",
"gatsby-plugin-typescript": "^4.25.0",
"gatsby-plugin-zopfli": "^2.0.0",
"gatsby-source-filesystem": "^4.24.0",
"gatsby-source-ghost": "^5.0.2",
"gatsby-transformer-sharp": "^4.24.0",
"immer": "^10.0.3",
"js-sha256": "^0.9.0",
"prop-types": "^15.8.1",
"query-string": "^8.1.0",
"react": "^18.2.0",
"react-alice-carousel": "^2.8.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-hook-form": "^7.43.9",
"react-modal": "^3.16.1",
"react-obfuscate": "^3.6.9",
"react-player": "^2.12.0",
"react-select": "^5.7.2",
"react-slider": "^2.0.4",
"react-use": "^17.4.0",
"zod": "^3.22.4",
"zustand": "^4.5.1"
}
},
"dependencies": {
"@radix-ui/react-navigation-menu": "^1.1.2",
"@sentry/gatsby": "^7.36.0",
"@tanstack/react-query": "^5.24.1",
"@tanstack/react-query-devtools": "^5.24.1",
"axios": "^1.1.3",
"class-variance-authority": "^0.7.0",
"classnames": "^2.3.2",
"crypto-js": "^4.1.1",
"gatsby": "^4.25.6",
"gatsby-plugin-advanced-sitemap": "^2.1.0",
"gatsby-plugin-anchor-links": "^1.2.1",
"gatsby-plugin-client-side-redirect": "^1.1.0",
"gatsby-plugin-google-analytics": "^4.24.0",
"gatsby-plugin-google-tagmanager": "^4.25.0",
"gatsby-plugin-hotjar": "^1.1.1",
"gatsby-plugin-image": "^2.24.0",
"gatsby-plugin-mdx": "^4.3.0",
"gatsby-plugin-robots-txt": "1.7.1",
"gatsby-plugin-sharp": "^4.24.0",
"gatsby-plugin-smoothscroll": "^1.2.0",
"gatsby-plugin-typescript": "^4.25.0",
"gatsby-plugin-zopfli": "^2.0.0",
"gatsby-source-filesystem": "^4.24.0",
"gatsby-source-ghost": "^5.0.2",
"gatsby-transformer-sharp": "^4.24.0",
"immer": "^10.0.3",
"js-sha256": "^0.9.0",
"prop-types": "^15.8.1",
"query-string": "^8.1.0",
"react": "^18.2.0",
"react-alice-carousel": "^2.8.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-hook-form": "^7.43.9",
"react-modal": "^3.16.1",
"react-obfuscate": "^3.6.9",
"react-player": "^2.12.0",
"react-select": "^5.7.2",
"react-slider": "^2.0.4",
"react-use": "^17.4.0",
"zod": "^3.22.4",
"zustand": "^4.5.1"
}
},
` "devDependencies": { "@babel/preset-env": "^7.21.5", "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.21.5", "@storybook/addon-essentials": "^7.0.9", "@storybook/addon-interactions": "^7.0.9", "@storybook/addon-links": "^7.0.9", "@storybook/addon-styling": "^1.0.7", "@storybook/blocks": "^7.0.9", "@storybook/manager-api": "^7.0.10", "@storybook/react": "^7.0.9", "@storybook/react-webpack5": "^7.0.9", "@storybook/testing-library": "^0.0.14-next.2", "@storybook/theming": "^7.0.10", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@types/axios": "^0.14.0", "@types/node": "^18.16.1", "@types/react": "^18.2.0", "@types/react-dom": "^18.2.1", "@types/react-slider": "^1.3.1", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "autoprefixer": "^10.4.14", "babel-eslint": "^10.1.0", "babel-jest": "^29.5.0", "babel-preset-gatsby": "^2.24.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-storybook": "^0.6.12", "gatsby-plugin-perf-budgets": "^0.0.18", "gatsby-plugin-postcss": "^5.24.0", "gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30", "husky": "^8.0.3", "identity-obj-proxy": "^3.0.0", "jest": "^29.5.0", "jest-canvas-mock": "^2.5.0", "jest-environment-jsdom": "^29.5.0", "jest-localstorage-mock": "^2.4.26", "postcss": "^8.4.23", "prettier": "^2.8.8", "react-test-renderer": "^18.2.0", "simple-zustand-devtools": "^1.1.0", "standardx": "^7.0.0", "storybook": "^7.0.9", "tailwindcss": "^3.3.1", "typescript": "^5.0.4" }, The problem is in our eslint
flat-fuchsia
flat-fuchsia2y ago
This library would work fine without the devtools?
Yeah, devtools is a nice-to-have, not a requirement. It's not a solution but you could just leave it off for now until your project makes it to eslint v8+
ratty-blush
ratty-blushOP2y ago
From this deps which ones do you think I need to to update to support eslint v8+? I'm trying to update all the deps related to parsers/ts/eslint and got more errors I'm using nodejs v20 , we need to update gatsby core at the end, but for now Im happy just updating the eslint
flat-fuchsia
flat-fuchsia2y ago
Removing @tanstack/react-query-devtools and adding it later If you can update to eslint v8 now then I’m guessing it’ll fix your problem now I don’t recall the differences between v7 and v8 so you’d have to check their migration guide

Did you find this page helpful?