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

Vue SSR - TypeError: createServer is not a function #1307

Closed
ramonmalcolm10 opened this issue Oct 2, 2022 · 3 comments
Closed

Vue SSR - TypeError: createServer is not a function #1307

ramonmalcolm10 opened this issue Oct 2, 2022 · 3 comments

Comments

@ramonmalcolm10
Copy link

Versions:

  • @inertiajs/inertia version: 0.11.1
  • @inertiajs/inertia-vue3: ^0.6.0
  • @inertiajs/server: ^0.1.0
  • @vue/server-renderer": "^3.2.40
  • vue: ^3.2.40
  • vite: ^3.0.0

Describe the problem:
Getting error "TypeError: createServer is not a function" while trying SSR from import createServer from '@inertiajs/server package.

Steps to reproduce:

  • Followed the steps for server side setup provided by the documentation
  • Execute command vite build --ssr --outDir public/build/server
  • Execute command node public/build/server/ssr.mjs
@amiranagram
Copy link

This solved it for me:

inertiajs/server#10 (comment)

@SH8GH
Copy link

SH8GH commented Jan 18, 2023

are you sure that you exclude in ssr.external = @inertia/server?

@reinink
Copy link
Member

reinink commented Jan 18, 2023

Thanks @amiranagram and @KimhoutSam for your help here.

Going to close this one since @ramonmalcolm10 hasn't responded, and I don't think there is actually a bug here.

@reinink reinink closed this as completed Jan 18, 2023
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

4 participants