Internal Server Error: loader-fetcher/dist/index.js

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets)

index.js:617 Uncaught Error: Error fetching loader data: Internal Server Error
    at Api.<anonymous> (file:///Users/username/Downloads/app/node_modules/@plasmicapp/loader-fetcher/dist/index.js:158:15)
    at Generator.next (<anonymous>)
    at fulfilled (file:///Users/username/Downloads/app/node_modules/@plasmicapp/loader-fetcher/dist/index.js:50:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)


Debugger attached.
 ⨯ ../src/api.ts (278:13) @ Api.<anonymous>
 ⨯ Error: Error fetching loader data: Internal Server Error
    at Api.<anonymous> (/Users/username/Downloads/app/node_modules/@plasmicapp/loader-fetcher/dist/index.js:158:15)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/username/Downloads/app/node_modules/@plasmicapp/loader-fetcher/dist/index.js:50:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'Error',
  page: '/'
}
  276 |     if (resp.status >= 400) {
  277 |       const error = await this.parseJsonResponse(resp);
> 278 |       throw new Error(
      |             ^
  279 |         `Error fetching loader data: ${
  280 |           error?.error?.message ?? resp.statusText
  281 |         }`
 ⨯ ../src/api.ts (278:13) @ Api.<anonymous>
 ⨯ Error: Error fetching loader data: Internal Server Error
    at Api.<anonymous> (/Users/username/Downloads/app/node_modules/@plasmicapp/loader-fetcher/dist/index.js:158:15)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/username/Downloads/app/node_modules/@plasmicapp/loader-fetcher/dist/index.js:50:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'Error',
  page: '/'
}
  276 |     if (resp.status >= 400) {
  277 |       const error = await this.parseJsonResponse(resp);
> 278 |       throw new Error(
      |             ^
  279 |         `Error fetching loader data: ${
  280 |           error?.error?.message ?? resp.statusText
  281 |         }`
 ✓ Compiled /_error in 142ms (263 modules)
 GET / 500 in 112645ms

To reproduce

  1. Update to Next 15
  2. Try to access localhost:3000

Relevant links:

Hi, we are investigating it.

Hi @fmota I am very grateful! :blush:

@fmota We’ve fixed it! This is what we think worked.

rm -rf node_modules package-lock.json

npm cache clean --force

npm uninstall -g npm

npm install -g pnpm

Then pnpm dev to start the app.

We hope this helps someone!!

@fmota I’m sorry. I was wrong. I’m still getting different error. :sweat_smile:

⨯ Error: Error parsing JSON response: SyntaxError: Unexpected end of JSON input; status: 504; response:
    at Api.<anonymous> (/Users/user/Downloads/Aita/node_modules/.pnpm/@plasmicapp+loader-fetcher@1.0.54/node_modules/@plasmicapp/loader-fetcher/dist/index.js:172:15)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/user/Downloads/Aita/node_modules/.pnpm/@plasmicapp+loader-fetcher@1.0.54/node_modules/@plasmicapp/loader-fetcher/dist/index.js:50:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'Error',
  page: '/'
}
 ⨯ Error: Error parsing JSON response: SyntaxError: Unexpected end of JSON input; status: 504; response:
    at Api.<anonymous> (/Users/user/Downloads/Aita/node_modules/.pnpm/@plasmicapp+loader-fetcher@1.0.54/node_modules/@plasmicapp/loader-fetcher/dist/index.js:172:15)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/user/Downloads/Aita/node_modules/.pnpm/@plasmicapp+loader-fetcher@1.0.54/node_modules/@plasmicapp/loader-fetcher/dist/index.js:50:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'Error',
  page: '/'
}
 GET / 500 in 1040ms

Hi, this issue is happening because of this project which contains >5k code components. This is hitting a limit for the project, we will be shipping an improvement but I recommend to be more considerate when registering code components.

@fmota I’m grateful for your response.

Hey, I’m really sorry. I didn’t know there was a limit! It was completely unintentional! That project probably refers to our Lucide icons.

We honestly want to be considerate. Inconsiderate, it implies we weren’t and we honestly didn’t mean to. We wanted to register Lucide icons and that was the fastest way we knew how to.

We specifically discussed and asked for advice on the Plasmic forum here: Request for Optimized Icon Registration Solution - #6 by aihe_team

Please if there are any guidelines on how not to negatively impact the general health of the system, kindly let us know and we will gladly stick to it. For example, is there a limit on the number of components that can be registered for example? This would help greatly!!

Again our apologies. Have a great day!