Skip to content
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

Monorepo with Solid Start: [nitro] [unhandledRejection] TypeError: Cannot read properties of undefined (reading 'file') #1495

Closed
2 tasks done
floratmin opened this issue Nov 3, 2024 · 1 comment

Comments

@floratmin
Copy link

floratmin commented Nov 3, 2024

Describe the bug

I set up a monorepo with Solid (tool-app) and Solid Start (page-app) apps. The Solid App builds fine, but the Solid Start App throws an error when I try to build it with the option to prerender the page on building or throws an error when I build it without prerendering when serving.

When I remove the following lines in the file app.config.ts I can build:

prerender: {
    crawlLinks: true,
},

To set up the repository to make Solid Start work I set up a symlink from the page-app folder like this:

cd apps/page/app
ln -s ../../../node_modules/ node_modules

The following commands work fine:

nx serve tool-app
nx build tool-app
nx serve page-app

The following command throws an error when page should be prerendered:

nx build page-app

Building without prerendering works, but when trying to serve the built with node apps/page/app/.output/server/index.mjs the server throws the same error.

Setting the version of @vanilla-extract/vite-plugin to 4.0.10 throws [vanilla-extract] Failed to load url errors.

I also created an issue on the solid-start page.

Reproduction

https://github.com/floratmin/workspace-vanilla-css-vinxi-error

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 5700G with Radeon Graphics
    Memory: 14.66 GB / 30.73 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 22.8.0 - ~/.nvm/versions/node/v22.8.0/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v22.8.0/bin/npm
    pnpm: 9.9.0 - ~/.local/share/pnpm/pnpm
  Browsers:
    Chrome: 130.0.6723.91
  npmPackages:
    @vanilla-extract/css: ^1.16.0 => 1.16.0 
    @vanilla-extract/recipes: ^0.5.5 => 0.5.5 
    @vanilla-extract/sprinkles: ^1.6.3 => 1.6.3 
    @vanilla-extract/vite-plugin: 4.0.17 => 4.0.17 
    rollup: 4.22.4 => 4.22.4 
    vite: 5.4.10 => 5.4.10

Used Package Manager

pnpm

Logs

⚙  Preparing app for node-server...
✔ Generated public .output/public                                               vinxi 10:06:29 AM
ℹ Initializing prerenderer                                                      vinxi 10:06:29 AM
ℹ Building Nitro Server (preset: nitro-prerender, compatibility date: ``)       vinxi 10:06:29 AM
✔ Nitro Server built                                                            vinxi 10:06:30 AM
✔ You can preview this build using npx serve .output/public                     vinxi 10:06:30 AM
ℹ Prerendering 1 initial routes with crawler                                    vinxi 10:06:30 AM
[nitro] [unhandledRejection] TypeError: Cannot read properties of undefined (reading 'file')
    at Object.get (file:///home/playground/workspace/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected][email protected]_pkkifnsbod3b7nmoc7jpr5cmom/node_modules/vinxi/lib/manifest/prod-server-manifest.js:168:33)
    at file:///home/playground/workspace/apps/page/app/.vinxi/prerender/chunks/nitro/nitro.mjs:1166:32
[nitro] [unhandledRejection] TypeError: Cannot read properties of undefined (reading 'file')
    at Object.get (file:///home/playground/workspace/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected][email protected]_pkkifnsbod3b7nmoc7jpr5cmom/node_modules/vinxi/lib/manifest/prod-server-manifest.js:168:33)
    at file:///home/playground/workspace/apps/page/app/.vinxi/prerender/chunks/nitro/nitro.mjs:1020:89

Validations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant