-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Parcel 2 nightly 766: running app fails with cannot read property 'init' of undefined #6642
Comments
Could you provide a small reproduction of the issue? From the stack trace it looks like something in |
I don't have a repro, but it does look like if I comment out our initialization of Sentry Either way, sourcemaps still seem to be broken on this nightly version, which was our main motivator for upgrading. Is there a better version to try to get sourcemaps working for TS projects? |
That sounds like a regression in Parcel then.
How are they not working? Are you using tsc and/or Babel? Can you provide a reproduction? |
Using babel and tsc (configuration in the issue description above). I think it's similar to this issue: #6645 When the app runs, I see this type of code in an average tsx file in the source maps:
|
This makes Parcel's scope hoisting ineffective (or even useless), you should use |
That fixed it, thank you! 🎉 |
I still cannot reproduce this. I tried with the babel and parcel configs listed above and the following code: import * as Sentry from "@sentry/react";
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
}); There's no runtime error when loading in the browser for me. |
Hi everyone, Sorry to be late to the party and post comment to closed issue, but I have similar issue with Please, find the gist with code to reproduce the error: https://gist.github.com/playpauseandstop/44aab02fea0bca15d7b0cf78157ff3c6 I have used clean And the most interesting fact, that in
|
After release of Assuming it was finally fixed between nightly 843 and final release, so we’re good now. Thanks! |
🐛 bug report
In the latest nightly, the app builds but when running there is an error
Uncaught TypeError: Cannot read property 'init' of undefined
🎛 Configuration (.babelrc, package.json, cli command)
package.json
.parcelrc
babel.config.json
🤔 Expected Behavior
App should run
😯 Current Behavior
Where the line flagged is:
in esmodules-helper:
🔦 Context
I have removed .parcel-cache, other caches, reinstalled node_modules, etc. The app builds but when running is stuck.
I also attempted using
--no-scope-hoist
for the build command.🌍 Your Environment
EDIT:
version of sentry used:
"@sentry/react": "^6.10.0",
also tried"@sentry/react": "^6.9.0",
The text was updated successfully, but these errors were encountered: