You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When applying 'basic-virtual-inside-file-based' case in app in nx, tsr generate error occurs.
PS C:\Users\9480335\workspace\refers\nx-tanstack-router\apps\nxtest> npx tsr generate
♻️ Generating routes...
TypeError: nodes.map is not a function
at getRouteNodesRecursive (C:\Users\9480335\workspace\refers\nx-tanstack-router\node_modules\.pnpm\@[email protected]\node_modules\@tanstack\router-generator\dist\cjs\filesystem\virtual\getRouteNodes.cjs:49:11)
at Module.getRouteNodes (C:\Users\9480335\workspace\refers\nx-tanstack-router\node_modules\.pnpm\@[email protected]\node_modules\@tanstack\router-generator\dist\cjs\filesystem\virtual\getRouteNodes.cjs:27:26)
at recurse (C:\Users\9480335\workspace\refers\nx-tanstack-router\node_modules\.pnpm\@[email protected]\node_modules\@tanstack\router-generator\dist\cjs\filesystem\physical\getRouteNodes.cjs:65:71)
at async C:\Users\9480335\workspace\refers\nx-tanstack-router\node_modules\.pnpm\@[email protected]\node_modules\@tanstack\router-generator\dist\cjs\filesystem\physical\getRouteNodes.cjs:87:11
at async Promise.all (index 1)
at async recurse (C:\Users\9480335\workspace\refers\nx-tanstack-router\node_modules\.pnpm\@[email protected]\node_modules\@tanstack\router-generator\dist\cjs\filesystem\physical\getRouteNodes.cjs:82:5)
at async Module.getRouteNodes (C:\Users\9480335\workspace\refers\nx-tanstack-router\node_modules\.pnpm\@[email protected]\node_modules\@tanstack\router-generator\dist\cjs\filesystem\physical\getRouteNodes.cjs:157:3)
at async Module.generator (C:\Users\9480335\workspace\refers\nx-tanstack-router\node_modules\.pnpm\@[email protected]\node_modules\@tanstack\router-generator\dist\cjs\generator.cjs:66:27)
at async Module.generate (C:\Users\9480335\workspace\refers\nx-tanstack-router\node_modules\.pnpm\@[email protected]\node_modules\@tanstack\router-cli\dist\cjs\generate.cjs:6:5)
at async C:\Users\9480335\workspace\refers\nx-tanstack-router\node_modules\.pnpm\@[email protected]\node_modules\@tanstack\router-cli\dist\cjs\index.cjs:28:5
PS C:\Users\9480335\workspace\refers\nx-tanstack-router\apps\nxtest>
routes path (~/apps/nxtest/src/pages)
__virtual.ts
import{defineVirtualSubtreeConfig,index,physical,route,}from'@tanstack/virtual-file-routes';// this just shows that you can use an async function to define your virtual routesexportdefaultdefineVirtualSubtreeConfig(async()=>[index('home.tsx'),route('$postId','details.tsx'),physical('/inception','lets-go'),]);
Which project does this relate to?
Router
Describe the bug
When applying 'basic-virtual-inside-file-based' case in app in nx, tsr generate error occurs.
routes path (~/apps/nxtest/src/pages)
__virtual.ts
tsr.config.json
If I ignore the posts directory, it works fine without error.
Your Example Website or App
https://github.com/carriebae/nx-tanstack-router
Steps to Reproduce the Bug or Issue
Expected behavior
tsr generate should work without errors even with __virtual.ts included.
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: