Skip to content

Copied your entry.worker.ts and tried converting to .js with esbuild but getting an error. #65

Answered by ShafSpecs
jmaldon1 asked this question in Q&A
Discussion options

You must be logged in to vote

So more updates, I can't get it to work with import { json } from "@remix-run/node" . I get the Dynamic require of "path" is not supported error.

I am able to get it to work with import { json } from "@remix-run/server-runtime"; like how you have in your code.

Then once I get it working, I run into a resulted in a network error response: an object that was not a Response was passed to respondWith(). error after the first page load. I am able to solve this by commenting out the process.env.NODE_ENV call:

function debug(...messages: unknown[]): void {
  // if (process.env.NODE_ENV === "development") {
  //   console.log(...messages);
  // }
  console.log(...messages);
}

Then things seem t…

Replies: 3 comments 14 replies

Comment options

You must be logged in to vote
1 reply
@jmaldon1
Comment options

Comment options

You must be logged in to vote
13 replies
@jmaldon1
Comment options

@ShafSpecs
Comment options

@ShafSpecs
Comment options

@jmaldon1
Comment options

@ShafSpecs
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ShafSpecs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants