sandulat / routes-gen

Framework agnostic routes typings generator. Remix ☑️ SolidStart ☑️
MIT License
283 stars 12 forks source link

Is there a limit to the number of routes #23

Closed brightpixels closed 2 years ago

brightpixels commented 2 years ago

Describe the bug

In a Remix app, we are struggling to add any additional routes. We are getting the following error:

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /Users/my-appl/node_modules/@routes-gen/remix/dist/index.js:52:30
    at ChildProcess.exithandler (child_process.js:310:7)
    at ChildProcess.emit (events.js:376:20)
    at maybeClose (internal/child_process.js:1055:16)
    at Socket.<anonymous> (internal/child_process.js:441:11)
    at Socket.emit (events.js:376:20)
    at Pipe.<anonymous> (net.js:673:12)

The only way around it, is to delete an existing route in order to create a new one.

I have tested on a fresh remix app and limit appears to be 68 routes and issues shows up when I create any additional routes.

Your Example Website or App

Local app

Steps to Reproduce the Bug or Issue

  1. Create 70 routes on a fresh remix app
  2. Try to run the command routes-gen -d @routes-gen/remix in a Remix App

Expected behavior

To be able to generate an updated /routes.d.ts file

Screenshots or Videos

No response

Platform

Additional context

No response

sandulat commented 2 years ago

@brightpixels Looking into it.

sandulat commented 2 years ago

@brightpixels This is now fixed and published under @routes-gen/remix 0.3.3.

image

Upgrade with yarn add @routes-gen/remix@latest.

Please let me know if you still encounter this issue.

Thank you very much for opening the issue!