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

No stacktrace sources in denoflare serve #71

Open
nounder opened this issue Feb 18, 2024 · 2 comments
Open

No stacktrace sources in denoflare serve #71

nounder opened this issue Feb 18, 2024 · 2 comments

Comments

@nounder
Copy link

nounder commented Feb 18, 2024

When running a script via denoflare serve, error stracktraces don't have source file path:

Error servicing request Error: DenoflareResponse.statusText not implemented
    at DenoflareResponse.get statusText (blob:null/479bbc34-2f8a-4e03-9c0c-6e2cb57f332e:479:15)
    at WorkerRouter.#fireError (blob:null/2f968119-42b1-4463-a069-f31f715a2813:774:78)
    at WorkerRouter.#route (blob:null/2f968119-42b1-4463-a069-f31f715a2813:768:28)
    at Object.fetch (blob:null/2f968119-42b1-4463-a069-f31f715a2813:958:27)
    at ModuleWorkerExecution.fetch (blob:null/479bbc34-2f8a-4e03-9c0c-6e2cb57f332e:629:34)
    at WorkerExecution.fetch (blob:null/479bbc34-2f8a-4e03-9c0c-6e2cb57f332e:727:34)
    at blob:null/479bbc34-2f8a-4e03-9c0c-6e2cb57f332e:3107:41
    at RpcChannel.receiveMessage (blob:null/479bbc34-2f8a-4e03-9c0c-6e2cb57f332e:39:42)
    at self.onmessage (blob:null/479bbc34-2f8a-4e03-9c0c-6e2cb57f332e:3146:30)
    at wrappedHandler (ext:deno_web/02_event.js:1401:12)
@johnspurlock-skymethod
Copy link
Contributor

Yes this is tricky. Denoflare bundles (and rebundles) your code and runs it in a permissionless worker by defaule, and the last time I looked into it (a while ago) it was impossible to send sourcemaps. Might be a good idea to look into it again and see if it's still the case.

You can run with --local-isolation none which will import your code directly, but you'll lose auto-reloading, and will run outside of the permissionless worker so will be able to access the fs etc (ie an environment less like cloudflare). https://denoflare.dev/cli/serve

@nounder
Copy link
Author

nounder commented Feb 19, 2024

last time I looked into it (a while ago) it was impossible to send sourcemap

Couldn't find code that is responsible for bundling but after denoland/deno#11073 and general development of Fresh framework, esbuild is working really smooth with Deno. High confidence that source map should work with it.

You can run with --local-isolation none which will import your code directly, but you'll lose auto-reloading, and will run outside of the permissionless worker so will be able to access the fs etc (ie an environment less like cloudflare).

Ah, I haven't considered that. I moved my side project to wrangler now because I wanted to make it happen ™, but will try it out in my next revision.

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