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

[Bug?]: Build without SSR throw error on prerender "Should be provided by compiler" #1209

Closed
2 tasks done
ivanjoz opened this issue Jan 3, 2024 · 3 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@ivanjoz
Copy link

ivanjoz commented Jan 3, 2024

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

When building with ssr: false, I get the error "Should be provided by compiler".
Doesn't generate a .html anywhere

Expected behavior 🤔

generate a .html file that serves as an entry point like a conventional SPA

Steps to reproduce 🕹

Steps:

  1. npm init solid@latest
  2. choose: Which template do you want to use? = basic
  3. choose: Server Side Rendering? = no
  4. choose: Use TypeScript? = yes
  5. npm install
  6. npm run build

package.json:
{ "name": "demo1", "type": "module", "scripts": { "dev": "vinxi dev", "build": "vinxi build", "start": "vinxi start" }, "dependencies": { "@solidjs/meta": "^0.29.2", "@solidjs/router": "^0.10.5", "@solidjs/start": "^0.4.2", "solid-js": "^1.8.7", "vinxi": "0.0.59" }, "engines": { "node": ">=18" } }

Context 🔦

Generate a simple SPA that I can upload as static site. I use SolidStart because of the file based routing.

Your environment 🌎

System:
  OS: Linux KDE Neon | Kernel 6.6.1-060601-generic
  Arquitecture: x86_64
Node Version: v18.17.1
SolidStart version: 0.4.2
@ivanjoz ivanjoz added the bug Something isn't working label Jan 3, 2024
@u1in
Copy link
Contributor

u1in commented Jan 3, 2024

I found a similar issue in vinxi, maybe helpful.
"Should be provided by compiler" Error #77

@ivanjoz
Copy link
Author

ivanjoz commented Jan 3, 2024

It is solve using "override" in the package.json to match de vinxi version in the dependencies. In mi case I am using vinxi 0.0.62.

{
  "dependencies": {
    "@solidjs/meta": "^0.29.2",
    "@solidjs/router": "^0.10.5",
    "@solidjs/start": "^0.4.2",
    "solid-js": "^1.8.7",
    "vinxi": "0.0.62"
  },
  "overrides": {
    "vinxi": "0.0.62"
  },
}

@ryansolid
Copy link
Member

ryansolid commented Jan 5, 2024

Ok new version of Start now matching ranges in Vinxi should fix this. Try 0.4.3 of start and 0.1.x of Vinxi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants