-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug?]: can't prerender routes using npm install
#1162
Comments
@atilafassina have you managed to prerender anything so far with start/vinxi? |
Interestingly our docs are pre-rendered using this technique. And all CSR uses prerendering. Maybe this is a combo with server functions. That compiler error looks similar to when you access a server function that hasn't been transformed. |
Great point. I used the solid-start docs to narrow down what goes wrong, and it's quite odd, but I've found that it breaks as explained above only when using |
npm install
Hmm.. I wonder if this is why @nksaraf had the resolution code (that was breaking prerendering for me) before. What was happening before was completely different so I can't use that as any basis. But its odd that package manager would impact this so. |
This usually means something went wrong with the fs-router.. i'll look into it ,gotta admit haven't used npm in a while. Wondering if I can reproduce this in a stackblitz. |
I haven't been able to run the basic example of start 0.4 in stackblitz as is (no prerender flags), because I get this error: [h3] [unhandled] TypeError: Cannot read properties of undefined (reading 'assets')
at get assets [as assets] (/home/projects/pariwmzoo.github/node_modules/.pnpm/@solidjs+start@0.4.2_solid-js@1.8.7_vinxi@0.0.54_vite@5.0.10/node_modules/@solidjs/start/server/StartServer.tsx:50:109) |
@birkskyum I tried your repro setup: ![]() Seems to work for me.. Mind making a repo or something on stackblitz with the error you are describing. Have you got the latest versions of stuff? |
I was able to replicate on I think you need |
@brenelz , you're very right - 0.0.53 was the latest when I opened the ticket, and updating to 0.0.54 did the trick. Thanks you all |
Sorry @birkskyum. I was absolutely disconnected on vacation, only catching up with things now... 😬 |
Duplicates
Latest version
Current behavior 😯
initializing the
basic
template, and enabling prerender with this vite config (setting ssr: true doesn't change things):then running
npm run build
gives this error:┌────────────────────────────────────────┐ │ ⚙ Preparing app for node-server... │ └────────────────────────────────────────┘ vinxi hook app:build:nitro:config 11:43:20 PM vinxi hook app:build:nitro:assets:copy:start 11:43:20 PM ✔ Generated public .output/public vinxi 11:43:20 PM vinxi hook app:build:nitro:assets:copy:end 11:43:20 PM vinxi hook app:build:nitro:prerender:start 11:43:20 PM ℹ Initializing prerenderer vinxi 11:43:20 PM ERROR Should be provided by compiler 11:43:20 PM at .vinxi/prerender/index.mjs:1232:7 at ModuleJob.run (node:internal/modules/esm/module_job:217:25) at async ModuleLoader.import (node:internal/modules/esm/loader:308:24) at async prerender (node_modules/nitropack/dist/shared/nitro.0a84349b.mjs:56:26) at async createBuild (node_modules/vinxi/lib/build.js:306:2) at async Object.run (node_modules/vinxi/bin/cli.mjs:156:5) at async runCommand (node_modules/citty/dist/index.mjs:316:16) at async runCommand (node_modules/citty/dist/index.mjs:307:11) at async runMain (node_modules/citty/dist/index.mjs:441:7) ERROR Should be provided by compiler 11:43:20 PM
Expected behavior 🤔
I expected not getting an error here
Steps to reproduce 🕹
Steps:
Context 🔦
No response
Your environment 🌎
The text was updated successfully, but these errors were encountered: