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

npm run dev does not generate worker sourcemaps #1383

Closed
mcanaleta opened this issue Sep 28, 2023 · 1 comment
Closed

npm run dev does not generate worker sourcemaps #1383

mcanaleta opened this issue Sep 28, 2023 · 1 comment

Comments

@mcanaleta
Copy link

What is the location of your example repository?

https://github.com/Shopify/hydrogen/tree/main/templates/demo-store

Which package or tool is having this issue?

CLI

What version of that package or tool are you using?

5.4.0

What version of Remix are you using?

1.19.1

Steps to Reproduce

  • Create a new hydrogen app:
    npm create @shopify/hydrogen@latest

  • Create a vscode launch configuration for npm run dev (.vscode/launch.json):

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch npm run dev",
      "runtimeExecutable": "npm",
      "runtimeArgs": ["run-script", "dev"],
      "restart": true,
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen",
      "skipFiles": ["<node_internals>/**"],
      "timeout": 30000
    },
  ]
}
  • Set a breakpoint in some loader (example: root.tsx).

  • Start debugging.

  • A warning will show in the breakpoints section complaining about breakpoints could not be set:
    ❓ We couldn't find a corresponding source location, and didn't find any source with the name root.tsx

Launching with npm run dev -- --sourcemap has the same result

Expected Behavior

Sourcemaps for workers should be generated in dev. This was working until cli 5.1.2.

Actual Behavior

Sourcemaps are not generated (or some other issue prevents setting breakpoints).

@blittle
Copy link
Contributor

blittle commented Jun 21, 2024

Please make sure you are on the latest release and follow the instructions here: https://shopify.dev/docs/storefronts/headless/hydrogen/debugging/server-code

@blittle blittle closed this as completed Jun 21, 2024
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

3 participants