-
Notifications
You must be signed in to change notification settings - Fork 694
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
🐛 BUG: Invalid define value (must be an entity name or valid JSON syntax) #5720
Comments
You want |
Actually it doesn't work. It does prevent script error but the result I'm getting |
Thanks for reporting this! Would you be able to provide a reproduction repo that demonstrates the issue? Running |
Of course, @penalosa, I am very curious why it is working for you but not for me. Here is the reproducible with the fresh init: hope that helps! |
I know you guys are very busy, @penalosa and @KianNH, and I respect that. Nevertheless I wanted to give a little bump up here hoping you would find a chance for this in your near future sprints. This would save the users of Workers Platform a lot of time enabling the source maps to be published for tools like Sentry. Currently debugging deployed (and minified) workers is like debugging a black box. |
@flexchar It looks like this only works without quotes when the commit hash starts with an alphabetic character (if it starts with a number esbuild gets confused). I think this is why it was working for me initially. Could you try the following script? That should ensure that the variable is treated as a string. "scripts": {
"test": "wrangler deploy src/index.ts --define \"SENTRY_RELEASE:'$(git rev-parse HEAD)'\" --outdir dist --dry-run"
} |
We haven't heard from you in while so I'm going to close this issue for now. If you're still running into problems feel free to comment with more details and we can investigate further. |
Which Cloudflare product(s) does this pertain to?
Wrangler core
What version(s) of the tool(s) are you using?
3.52.0
What version of Node are you using?
21
What operating system and version are you using?
Mac
Describe the Bug
I've reviewed the following actions and can not figure out why my input keeps getting rejected.
config.define
#1297--var
and--define
arguments cloudflare-docs#6022Observed behavior
Work. This is going to be huge in getting Sentry work seamlessly with source map upload.
Expected behavior
Steps to reproduce
Neither of these work:
This is exactly what documentation says thou.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: