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

pnpm build - Memory requirements #61

Closed
efrazier opened this issue Dec 28, 2023 · 2 comments
Closed

pnpm build - Memory requirements #61

efrazier opened this issue Dec 28, 2023 · 2 comments

Comments

@efrazier
Copy link

efrazier commented Dec 28, 2023

What should I expect? I found that doing the build failed with the good old heap out of memory error. I had to increase the size of my AWS instance again, because this was for real. I ended up peaking on the build with about 6G in use and all was well.

5.15.0-1051-aws #56~20.04.1-Ubuntu SMP Tue Nov 28 15:43:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

node -v v20.10.0

npm -v 10.2.3

pnpm -v 8.13.1

env | grep NODE
NODE_OPTIONS=--max-old-space-size=32768

So this worked, but I am wondering why I need a large instance just to build an Agency website??

Also running pnpm start tells me to run ./server/index.mjs,

image

but that is actually located here

:/home/directus/team-osb# node .output/server/index.mjs
Listening on http://[::]:3000

@bryantgillespie
Copy link
Contributor

Also running pnpm start tells me to run ./server/index.mjs,

image

but that is actually located here

:/home/directus/team-osb# node .output/server/index.mjs
Listening on http://[::]:3000

When you're working locally nuxt start loads the .env file for you. In your production deployment, depending on your Nuxt preset and host - Vercel, Netlify, etc – that host will inject that .env file for you.

@bryantgillespie
Copy link
Contributor

What should I expect? I found that doing the build failed with the good old heap out of memory error. I had to increase the size of my AWS instance again, because this was for real. I ended up peaking on the build with about 6G in use and all was well.

5.15.0-1051-aws #56 SMP Tue Nov 28 15:43:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

node -v v20.10.0

npm -v 10.2.3

pnpm -v 8.13.1

env | grep NODE
NODE_OPTIONS=--max-old-space-size=32768

I believe the memory hogging is a combo of the older versions of Nuxt and the nuxt-og-image module.

Pushing an update soon that has updated dependencies that hopefully solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants