-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed as not planned
Labels
Description
Which part? Which one?
https://docs.sentry.io/product/sentry-basics/integrate-frontend/initialize-sentry-sdk/
Description
The code in this tutorial simply does not work.
After step 2, Webpack errors with a SyntaxError when attempting to bundle index.js. The output is:
ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/bb/src/frontend-tutorial/src/index.js: Unexpected token, expected "," (20:5)
18 | replaysSessionSampleRate: 0.1,
19 | replaysOnErrorSampleRate: 1.0,
> 20 | ${<Sentry.Include name="code-comments/javascript/trace-sample-rate" />}
| ^
21 | });
22 |
This is using Node 22 (LTS), so the troubleshooting tip does not apply.
Also, step 1 has us install @sentry/react, but that is already installed in package.json so it seems pointless.
Also, upgrading the package.json dependencies to their latest versions breaks the tutorial.
Suggested Solution
Review and update your tutorial
Metadata
Metadata
Assignees
Labels
Projects
Status
Waiting for: Support