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

Sourcemap with cloudflare-workers project not working #6702

Open
1 task done
zwn opened this issue Jun 27, 2023 · 2 comments
Open
1 task done

Sourcemap with cloudflare-workers project not working #6702

zwn opened this issue Jun 27, 2023 · 2 comments

Comments

@zwn
Copy link

zwn commented Jun 27, 2023

What version of Remix are you using?

1.18.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

$ npx create-remix@latest
Need to install the following packages:
  create-remix@1.18.0
Ok to proceed? (y)
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
? Where would you like to create your app? ./my-remix-app
? What type of app do you want to create? Just the basics
? Where do you want to deploy? Choose Remix App Server if you're unsure; it's easy to change deployment targets.
Cloudflare Workers
? TypeScript or JavaScript? TypeScript
? Do you want me to run `npm install`? Yes
...
$ cd my-remix-app/
$ npm run dev
Ctrl-C
$ npx source-map-explorer build/index.js
build/index.js
  Your source map refers to generated column 1 on line 3306, but the source only contains 0 column(s) on that line.
  Check that you are using the correct source map.

Expected Behavior

The sourcemap should match.

Actual Behavior

I get the same error with 0.17.0. When I open Javascript debug terminal in vscodium and run npm run dev from there, the debugger attaches. In the Debug diagnostics window I can list all known files but only system node files are there - not a single file from the project.

@pcattori
Copy link
Contributor

To fix this we probably want to:

  • Remove the build script from the wrangler.toml file in the template (otherwise you're always running production code)
  • Ship sourcemaps with Remix packages OR change the CF templates to not require bundling dependencies

@jacob-ebey
Copy link
Member

Should be fixed by #7574

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

No branches or pull requests

5 participants