Closed hmellahi closed 7 months ago
Hey @hmellahi thanks for writing in!
It worked when testing locally with "npm run build" but doesn't work when I run it inside as a container.
Can you elaborate a bit on what doesn't work correctly? You first screenshot (Expected Result) shows a correctly source mapped error as far as I can tell. In the second (Actual Result) I can only see a breadcrumb of (supposedly?) the same error.
Based on this issue, I'm not sure what exactly doesn't work. Since you commented in #512, are you experiencing out of memory issues?
Hello @Lms24, thank you for the quick response.
No, I meant when I run npm run build
inside the container, the build works but the error isn't source-mapped, therefore I get (Actual Result).
@hmellahi Please provide a small reproduction example so we can debug this more effectively! There seem to be too many moving parts.
你好@Lms24, 谢谢你的快速反应。
不,我的意思是当我
npm run build
在容器内运行时,构建可以工作,但错误不是源映射的,因此我得到(实际结果)。
I think this is because your docker user has insufficient git permissions and cannot use sentry/cli to get commits
Hello guys, the issue has been resolved. It might have been caused by cache. Thank you for your time and assistance.
Environment
I am working with Self-hosted Sentry 23.12.1
"@sentry/vite-plugin": "2.16.1" "vite": "5.2.9" "vue": "^3.4.15" "@sentry/vue": "^7.110.1"
Problem
I integrated sentryVitePlugin to see where the bugs are happening in the source code. It worked when testing locally with "npm run build" but doesn't work when I run it inside as a container.
Steps to Reproduce
Update Vite.Config.ts
Run the frontend using a dockerfile
WORKDIR /app COPY frontend/package*.json ./ RUN npm install
RUN apt-get update RUN apt-get install -y ca-certificates COPY frontend/ . RUN npm run build
FROM nginx:stable-alpine as production-stage COPY config/common/frontend-nginx.conf /etc/nginx/nginx.conf COPY --from=build-stage /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]
Logs Diff
The only difference between build logs locally and inside docker is that release value is undefined when running inside docker, and also gives 'release.name' warning
Expected Result
When I run it locally
Actual Result
When I run it inside the container
Let me know If I forgot any details, thank you in advance!