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

怎么打包啊 打包报错了 npm run build #67

Open
Jesse54211 opened this issue Oct 28, 2022 · 3 comments
Open

怎么打包啊 打包报错了 npm run build #67

Jesse54211 opened this issue Oct 28, 2022 · 3 comments

Comments

@Jesse54211
Copy link

怎么打包啊 打包报错了 npm run build
image

@zhaojun1998
Copy link
Collaborator

@Jesse54211

报错信息是:JavaScript heap out of memory,可根据此关键词搜索问题,大概意思是内存不足。

可参考:

同时我使用一个纯净的 Linux 环境,新配置环境也编译通过了,相关版本以供参考:

[root@VM-24-8-centos ~]# node -v
v16.17.0
[root@VM-24-8-centos ~]# yarn -v
1.22.19
[root@VM-24-8-centos ~]# uname -a
Linux VM-24-8-centos 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@VM-24-8-centos ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:           3693         251        2272           0        1170        3151
Swap:             0           0           0
[root@VM-24-8-centos ~]# 

@zhaojun1998
Copy link
Collaborator

@Jesse54211

我又去 vite 的 issue 里找到了一篇讨论这个问题的,目前看来可能是 vite 的 bug,也可能是引用的某个依赖的 bug,目前这个还没有定论,基本原因是内存泄漏导致编译时需要大量内存,我开发机内存 32G,所以没遇到这个问题,但我会持续关注此问题并进行反馈。

@c100515
Copy link

c100515 commented Dec 17, 2022

一样 也是报内存不足

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

3 participants