Skip to content

ESLint error for import cycle when using create-tsrouter-app #148

@bieno002

Description

@bieno002

Which project does this relate to?

Create Tanstack App

Describe the bug

I tried creating a fresh tanstack router project using the following command:
npx create-tsrouter-app@latest --add-ons

I made default selections (file router, tailwind css), then chose EsLint and the following add-ons:

Netlify
Shadcn
Query
After this finished, I navigated to the created directory and ran "npm install". Then when running "npm run lint", I get this error right away:

npm run lint

> lint
> eslint

[@stylistic/eslint-plugin-js] This package is deprecated in favor of the unified @stylistic/eslint-plugin, please consider migrating to the main package

Oops! Something went wrong! :(

ESLint: 9.32.0

EslintPluginImportResolveError: node with invalid interface loaded as resolver
Occurred while linting /Users/jerrad/Code/react-apps/toro-tally/vite.config.ts:1
Rule: "import/no-cycle"
    at requireResolver (file:///Users/jerrad/Code/react-apps/toro-tally/node_modules/eslint-plugin-import-x/lib/utils/legacy-resolver-settings.js:100:21)
    at normalizeConfigResolvers (file:///Users/jerrad/Code/react-apps/toro-tally/node_modules/eslint-plugin-import-x/lib/utils/legacy-resolver-settings.js:50:38)
    at fullResolve (file:///Users/jerrad/Code/react-apps/toro-tally/node_modules/eslint-plugin-import-x/lib/utils/resolve.js:188:64)
    at relative (file:///Users/jerrad/Code/react-apps/toro-tally/node_modules/eslint-plugin-import-x/lib/utils/resolve.js:215:12)
    at remotePath (file:///Users/jerrad/Code/react-apps/toro-tally/node_modules/eslint-plugin-import-x/lib/utils/export-map.js:157:20)
    at captureDependency (file:///Users/jerrad/Code/react-apps/toro-tally/node_modules/eslint-plugin-import-x/lib/utils/export-map.js:258:23)
    at captureDependencyWithSpecifiers (file:///Users/jerrad/Code/react-apps/toro-tally/node_modules/eslint-plugin-import-x/lib/utils/export-map.js:252:13)
    at ExportMap.parse (file:///Users/jerrad/Code/react-apps/toro-tally/node_modules/eslint-plugin-import-x/lib/utils/export-map.js:304:17)
    at ExportMap.for (file:///Users/jerrad/Code/react-apps/toro-tally/node_modules/eslint-plugin-import-x/lib/utils/export-map.js:75:31)
    at file:///Users/jerrad/Code/react-apps/toro-tally/node_modules/eslint-plugin-import-x/lib/utils/export-map.js:691:31

Your Example Website or App

Using create-tsrouter-app before viewing anything

Steps to Reproduce the Bug or Issue

  1. Run npx create-tsrouter-app@latest --add-ons
  2. Choose file router, tailwind css, EsLint, and addons of Netlify, shadcn, and query.
  3. Run npm run lint without making any modifications to the generated project code.

Expected behavior

Running eslint should not have errors out of the box.

Screenshots or Videos

No response

Platform

  • OS: mac osx 15.1.1.
"dependencies": {
    "@tailwindcss/vite": "^4.0.6",
    "@tanstack/react-query": "^5.66.5",
    "@tanstack/react-query-devtools": "^5.66.5",
    "@tanstack/react-router": "^1.130.2",
    "@tanstack/react-router-devtools": "^1.130.2",
    "@tanstack/router-plugin": "^1.121.2",
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "lucide-react": "^0.476.0",
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "tailwind-merge": "^3.0.2",
    "tailwindcss": "^4.0.6",
    "tailwindcss-animate": "^1.0.7"
  },
  "devDependencies": {
    "@tanstack/eslint-config": "^0.1.0",
    "@testing-library/dom": "^10.4.0",
    "@testing-library/react": "^16.2.0",
    "@types/react": "^19.0.8",
    "@types/react-dom": "^19.0.3",
    "@vitejs/plugin-react": "^4.3.4",
    "jsdom": "^26.0.0",
    "prettier": "^3.5.3",
    "typescript": "^5.7.2",
    "vite": "^6.3.5",
    "vitest": "^3.0.5",
    "web-vitals": "^4.2.4"
  }

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions