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

Identifier '$haml' has already been declared #13304

Closed
3 tasks done
rnenjoy opened this issue Aug 12, 2024 · 3 comments · Fixed by #13346
Closed
3 tasks done

Identifier '$haml' has already been declared #13304

rnenjoy opened this issue Aug 12, 2024 · 3 comments · Fixed by #13346
Assignees
Labels
Package: nuxt Issues related to the Sentry Nuxt SDK

Comments

@rnenjoy
Copy link

rnenjoy commented Aug 12, 2024

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nuxt

SDK Version

8.25.0

Framework Version

3.12.4

Link to Sentry event

No response

Reproduction Example/SDK Setup

https://github.com/rnenjoy/sentry-nuxt-bug

Steps to Reproduce

pnpm run dev

Expected Result

Instrument as usual

Actual Result

Cannot start nuxt: Identifier '$haml' has already been declared 11:31:58 AM

at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:163:18)
at callTranslator (node:internal/modules/esm/loader:430:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:436:30)

@github-actions github-actions bot added the Package: nuxt Issues related to the Sentry Nuxt SDK label Aug 12, 2024
@s1gr1d
Copy link
Member

s1gr1d commented Aug 13, 2024

Hello, thanks for reaching out. I see that you added the node options to almost all scripts. You only need to add them to the scripts that are running your build output:

"preview": "NODE_OPTIONS='--import ./public/instrument.server.mjs' nuxt preview",
"start": "NITRO_PORT=4000 NITRO_HOST=0.0.0.0 node  --import .output/public/instrument.server.mjs .output/server/index.mjs"

In general, we optimize for the production build of applications. And thanks for filing the issue, I will make this more clear in the docs :)

@rnenjoy
Copy link
Author

rnenjoy commented Aug 13, 2024

Makes sense! Sorry for that @s1gr1d !

@s1gr1d
Copy link
Member

s1gr1d commented Aug 14, 2024

You're welcome! However, I fixed this and you should be able to add the include flag in dev mode with v8.26.0

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nuxt Issues related to the Sentry Nuxt SDK
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants