最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

vercel - npm run build Stuck – How to Debug and Fix High Memory Usage by node.exe? - Stack Overflow

programmeradmin1浏览0评论

I'm trying to run npm run build to check if my Next.js project is ready for deployment. However, when I execute the command in VS Code, it gets stuck and does not complete. The terminal only shows: [email protected] build

next build

It has been stuck like this for several minutes without any progress. I previously attempted to deploy my project on Vercel, but I encountered 27 errors. After fixing all the errors, I wanted to verify that the build works locally before pushing the changes again. However, it seems like the build process is now stuck.

Upon checking Task Manager, I noticed that node.exe is using a significant amount of memory:

node.exe private memory usage: ~445,276 KB (~445MB) Working set memory: ~264,148 KB It appears that the npm run build process is consuming a lot of memory and getting stuck.

I did not delete .next or node_modules folders yet, because I am unsure if that would be a good idea. I fixed all previously reported build errors (27 errors) before running npm run build, but now it just hangs. I want to debug this issue properly before I try deploying again on Vercel. Would deleting .next or node_modules cause any unintended issues, and should I try it?

发布评论

评论列表(0)

  1. 暂无评论