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

JS error when creating an issue #32660

Closed
stuzer05 opened this issue Nov 27, 2024 · 7 comments · Fixed by #32661
Closed

JS error when creating an issue #32660

stuzer05 opened this issue Nov 27, 2024 · 7 comments · Fixed by #32661
Labels

Comments

@stuzer05
Copy link
Contributor

Description

Opne new issue page

testhelper.ts:5 Uncaught ReferenceError: process is not defined
    at g (testhelper.ts:5:3)
    at Z (dom.ts:80:7)
    at cg.updateUiList (repo-issue-sidebar-combolist.ts:51:5)
    at cg.init (repo-issue-sidebar-combolist.ts:143:12)
    at ug (repo-issue-sidebar-combolist.ts:158:40)
    at repo-issue-sidebar.ts:52:69
    at Pe (dom.ts:65:7)
    at ce (dom.ts:91:10)
    at hg (repo-issue-sidebar.ts:52:3)
    at Mg (repo-issue.ts:659:3)

Gitea Version

1.23.0+dev-720-g5a50b271e7

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

None

@lunny
Copy link
Member

lunny commented Nov 27, 2024

I can't reproduce it in both my local machine and the demo site.

@stuzer05
Copy link
Contributor Author

I can't reproduce it in both my local machine and the demo site.

introduced here 5a50b27

@stuzer05
Copy link
Contributor Author

@wxiaoguang

@yp05327
Copy link
Contributor

yp05327 commented Nov 28, 2024

image
I also got this error when editing my PR in the repo home page. 👀
image

@silverwind
Copy link
Member

#32661 will fix it.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Nov 28, 2024

@silverwind yup, you see, I have warned that it would break without careful typeof process check. It is difficult to catch in production.

I would still against to do that trick

@silverwind
Copy link
Member

silverwind commented Nov 28, 2024

I was just wrongly assuming webpack to work similar to vite where env vars don't need to be declared explicitely in config (thought they do have restrictions there, like the VITE_ prefix).

silverwind added a commit that referenced this issue Nov 28, 2024
Fixes: #32660

Environment vars in Webpack need to be declared in the config, otherwise
they will not be elimininated during compilation.
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Feb 26, 2025
richmahn pushed a commit to unfoldingWord/dcs that referenced this issue Mar 2, 2025
Fixes: go-gitea/gitea#32660

Environment vars in Webpack need to be declared in the config, otherwise
they will not be elimininated during compilation.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants