Open baharalidurrani opened 5 days ago
Try increasing nodejs memory limit. I had similar issue in my github actions deployment script. Solved it using the following:
- name: Build the application
env:
NODE_OPTIONS: "--max_old_space_size=4096" # Increase memory limit for build
run: |
npm ci
npm run build
Environment
Versions:
Steps to Reproduce
vite build --mode production
on Gitlabvite.config.ts
sentry.ts
-> injected inmain.tsx
Expected Result
Should build, generate sourcemap, and upload to sentry.
Actual Result
Adding
sentryVitePlugin
consumes too much heap memory. I know it could be a problem with the Gitlab runner, but thesentryVitePlugin
shouldn’t occupy much of the memory anyway. It works fine if I remove the plugin.Failed Build Logs on Gitlab: