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

Doesn't work on Scaleway serverless functions or AWS Lambda #212

Open
g3r4n opened this issue May 12, 2024 · 0 comments
Open

Doesn't work on Scaleway serverless functions or AWS Lambda #212

g3r4n opened this issue May 12, 2024 · 0 comments

Comments

@g3r4n
Copy link

g3r4n commented May 12, 2024

If I import the build like :

import * as build from '@remix-run/dev/server-build'

it doesn't work with the following error:

handler could not be imported: Error: @remix-run/dev/server-build is not meant to be used directly from node_modules. It exists to provide type definitions for a virtual module provided by the Remix compiler at build time.

So I change the import to the build output from vite:

import * as build from "../build/server/remix";

I've got a new error:

handler could not be imported: Error: Dynamic require of "http" is not supported

From what I see my issue comes from the entry.server.tsx file which use createReadableStreamFromReadable which requires native node module "http" that is not available. I think I've to recreate this file to work with Hono. any idea how can I do it ? Do you have an exemple I can used?
Am I doing something wrong ?
I'm building the function that I deploy using esbuild that's how I managed to track what was requiring the http module.

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

1 participant