router
router copied to clipboard
Is router-vite-plugin cjs build broken?
Describe the bug
failed to load config from /home/runner/work/app/vite.config.mts
error during build:
Error: Cannot find module '../../../node_modules/.pnpm/[email protected]/node_modules/zod/lib/index.js'
Require stack:
- /home/runner/work/ais-nozomi/ais-nozomi/node_modules/@tanstack/router-vite-plugin/build/cjs/packages/router-cli/src/config.js
- /home/runner/work/ais-nozomi/ais-nozomi/node_modules/@tanstack/router-vite-plugin/build/cjs/packages/router-vite-plugin/src/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
at Module._load (node:internal/modules/cjs/loader:975:27)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/home/runner/work/ais-nozomi/ais-nozomi/node_modules/@tanstack/router-vite-plugin/build/cjs/packages/router-cli/src/config.js:15:13)
at Module._compile (node:internal/modules/cjs/loader:135[6](https://github.com/CyberAgentAI/ais-nozomi/actions/runs/7530405285/job/20496845389#step:5:7):14)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
at Module.load (node:internal/modules/cjs/loader:119[7](https://github.com/CyberAgentAI/ais-nozomi/actions/runs/7530405285/job/20496845389#step:5:8):32)
at Module._load (node:internal/modules/cjs/loader:1013:12)
at Module.require (node:internal/modules/cjs/loader:1225:1[9](https://github.com/CyberAgentAI/ais-nozomi/actions/runs/7530405285/job/20496845389#step:5:10))
error: script "build" exited with code 1
Error: Process completed with exit code 1.
Your Example Website or App
none
Steps to Reproduce the Bug or Issue
I'm using bun and vite along with router-vite-plugin
on GitHub Actions.
I'm not sure where the problem is coming from, but looking at the router-vite-plugin
CJS build, it looks like its pointing to a non-existent file handled by pnpm (I'm not using pnpm anywhere by the way).
Expected behavior
Expect to not have any pnpm route package inside the CJS build
Screenshots or Videos
No response
Platform
- OS: [Linux] Running on GitHub Actions
Additional context
No response
I am having the same issue when using bun. Switching to another package manager seems to fix it for now.
Seems so weird, no one is using pnpm... Wonder whats going on
i have same problem also.
Thanks!