Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
736 views
in Technique[技术] by (71.8m points)

node.js - Expo build 'Javascript heap out of memory'

I have an Expo app that I am trying to build .

The build command I use is expo build:android

It fails with error as 'Javascript heap out of memory'

Added NODE_OPTIONS environment variable enter image description here

I tried export NODE_OPTIONS=--max_old_space_size=4096 to no effect Package.json

"scripts": {
"start": "node --max_old_space_size=8192 && expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"

},

I am using latest versions of Node NPM and expo-cli

Expo diagnostics

Expo CLI 4.1.0 environment info: System: OS: Windows 10 10.0.19042 Binaries: Node: 15.6.0 - C:Program Files odejs ode.EXE npm: 7.4.3 - C:Program Files odejs pm.CMD npmPackages: expo: ^39.0.5 => 39.0.5 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz => 0.63.2 react-native-web: ^0.13.18 => 0.13.18 react-navigation: ^4.4.3 => 4.4.3 Expo Workflow: managed

.env file :-

GENERATE_SOURCEMAP=false
question from:https://stackoverflow.com/questions/65884078/expo-build-javascript-heap-out-of-memory

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...