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

Cannot find module .output/server/index.mjs #2378

Closed
dillondotzip opened this issue Sep 19, 2024 · 1 comment
Closed

Cannot find module .output/server/index.mjs #2378

dillondotzip opened this issue Sep 19, 2024 · 1 comment

Comments

@dillondotzip
Copy link

Which project does this relate to?

Start

Describe the bug

When running bun run start (vinxi start) I get the following error: Cannot find module '/..../.output/server/index.mjs' imported from /...../node_modules/vinxi/bin/cli.mjs

I have no problems building the project.

Your Example Website or App

https://tanstack.com/router/latest/docs/framework/react/examples/start-basic

Steps to Reproduce the Bug or Issue

Use any example from tanstack start repo.

Run vinxi build then vinxi start.

Expected behavior

It should successfully run the server.

Screenshots or Videos

No response

Platform

- "@tanstack/start": "^1.58.4",
- "@tanstack/react-router": "^1.58.3",
- "@tanstack/router-plugin": "^1.58.4",
-  "vinxi": "^0.4.3"

Runtime: Bun

Additional context

Some more context nksaraf/vinxi#177

@dillondotzip
Copy link
Author

I solved this by explicitly setting the preset to node-server. It seems to be using vercel preset by default (even though in the vinxi docs it says it uses node-server by default).

  "scripts": {
    "dev": "vinxi dev",
    "build": "vinxi build --preset node-server",
    "start": "vinxi start --preset node-server",
  }

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

No branches or pull requests

2 participants