FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory #4080
Replies: 31 comments
-
Thank you for the reproduce repository, we will look into this issue. There are some solutions from previous issues worth trying. You can have a look at #1877 and see if they solve your problem. |
Beta Was this translation helpful? Give feedback.
-
Even I am facing the same issue. Please help |
Beta Was this translation helpful? Give feedback.
-
Any updates??? |
Beta Was this translation helpful? Give feedback.
-
Still facing the same issue.
Tried with different versions of Able to run on debug mode with the |
Beta Was this translation helpful? Give feedback.
-
Encountering this issue when adding aws-sdk to a NodeJS app |
Beta Was this translation helpful? Give feedback.
-
An update: it works when I set transpileOnly: true for ts-loader. |
Beta Was this translation helpful? Give feedback.
-
I have the same issue on my nestjs application, when I deploy it to heroku |
Beta Was this translation helpful? Give feedback.
-
Faced with the same issue with Angular application. Any ideas? |
Beta Was this translation helpful? Give feedback.
-
@nenecmrf Use smaller 3rd party packages . I had to switch to |
Beta Was this translation helpful? Give feedback.
-
I was facing the same problem and after upgrading node from v10.15.3 to v12.18.0 the issue went away. |
Beta Was this translation helpful? Give feedback.
-
Can this be verified ? Happy to help if it is still a persisting issue. Will be closed if we dint have replies. |
Beta Was this translation helpful? Give feedback.
-
If anyone comes here looking to build a JS frontend on Amplify, it seems that it comes from the difference in the way memory is handled by node v10 vs node v12. Check how you can add |
Beta Was this translation helpful? Give feedback.
-
Still having the issue when deploying Nest.js application to aws elastic beanstalk with docker file. Dockerfile
EB platform: Docker running on 64bit Amazon Linux 2/3.0.3 |
Beta Was this translation helpful? Give feedback.
-
were u able to resolve the issue? |
Beta Was this translation helpful? Give feedback.
-
@SaveYourTime A memory issue because of all client imports was fixed in #3398 Can you please check if this issue was fixed in version |
Beta Was this translation helpful? Give feedback.
-
This was fixed in 2.740.0. It works like charm now. |
Beta Was this translation helpful? Give feedback.
-
Thanks @ausshadu for verifying. Is the issue fixed in version |
Beta Was this translation helpful? Give feedback.
-
is the issue fixed your mentioned version? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing. |
Beta Was this translation helpful? Give feedback.
-
Hi @trivikr!
Here's my {
"dependencies": {
"@nestjs/cli": "^7.0.0",
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0",
"@nestjs/jwt": "^7.1.0",
"@nestjs/passport": "^7.1.0",
"@nestjs/platform-express": "^7.0.0",
"@nestjs/swagger": "^4.5.12",
"@nestjs/typeorm": "^7.1.0",
"@types/node": "^13.9.1",
"aws-sdk": "2.758.0",
"bcryptjs": "^2.4.3",
"class-transformer": "^0.2.3",
"class-validator": "^0.12.2",
"cookie-parser": "^1.4.5",
"dayjs": "^1.8.32",
"dotenv": "^8.2.0",
"helmet": "^3.23.3",
"mysql2": "^2.1.0",
"passport": "^0.4.1",
"passport-facebook-token": "^4.0.0",
"passport-jwt": "^4.0.0",
"passport-token-google2": "^0.1.4",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^6.5.4",
"swagger-ui-express": "^4.1.4",
"typeorm": "^0.2.25",
"typeorm-naming-strategies": "^1.1.0",
"typeorm-seeding": "^1.6.1"
},
"devDependencies": {
"@nestjs/schematics": "^7.0.0",
"@nestjs/testing": "^7.0.0",
"@types/express": "^4.17.3",
"@types/faker": "^4.1.12",
"@types/jest": "25.2.3",
"@types/multer": "^1.4.3",
"@types/passport-facebook-token": "^0.4.34",
"@types/passport-jwt": "^3.0.3",
"@types/supertest": "^2.0.8",
"@typescript-eslint/eslint-plugin": "3.0.2",
"@typescript-eslint/parser": "3.0.2",
"eslint": "7.1.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^4.2.5",
"jest": "26.0.1",
"lint-staged": "^10.2.11",
"prettier": "^2.0.5",
"supertest": "^4.0.2",
"ts-jest": "26.1.0",
"ts-loader": "^6.2.1",
"ts-node": "^8.6.2",
"tsconfig-paths": "^3.9.0",
"typescript": "^3.7.4"
}
} # Build
FROM node:12
WORKDIR /usr/src/app
COPY package.json .
COPY yarn.lock .
RUN yarn
COPY . .
RUN yarn build
# Run
FROM node:12-alpine
WORKDIR /usr/src/app
COPY --from=0 /usr/src/app .
EXPOSE 80
CMD ["yarn", "start:prod"] Error log
|
Beta Was this translation helpful? Give feedback.
-
Have the same problem |
Beta Was this translation helpful? Give feedback.
-
I fixed it. |
Beta Was this translation helpful? Give feedback.
-
i also face the same issue when i import the aws-sdk library my application memory is ~600MB and if i remove the import then my application memory is 254MB . |
Beta Was this translation helpful? Give feedback.
-
@amitgilad3
|
Beta Was this translation helpful? Give feedback.
-
Is the problem fixed when you import just the clients? This issue is also well addressed in JS SDK V3 which is under gamma release. |
Beta Was this translation helpful? Give feedback.
-
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing. |
Beta Was this translation helpful? Give feedback.
-
I'm still getting this. I'm using
I'm running node v12.13.0 I've tried modifying my .bashrc to include this line: I've tried modifying my app/build.gradle:
I've modified my package.json to include:
I've tried using both I've tried increasing my Android Studio memory - IDE max heap size, Gradle daemon max heap size, and Kotlin daemon max heap size are all at the maximum 4096mb. Something that I haven't seen suggested here is editing your gradle.properties to include:
The above seems to help produce release builds more reliably (but only just) Since installing Unfortunately using another package is not an option for me as I need to put records directly into a Kinesis stream. Ultimately, I don't understand why I need to increase the maximum memory required to build my app just to accommodate this specific SDK. Hopefully v3 will resolve this issue but it's still a release candidate and so not an option for production use. |
Beta Was this translation helpful? Give feedback.
-
Can confirm! Cut around 350 mb on nextjs, |
Beta Was this translation helpful? Give feedback.
-
here is the solution to the problem with docker + nestjs |
Beta Was this translation helpful? Give feedback.
-
Hi!, I was trying to import the library as the documentation said, that is:
However, the error disappeared when I changed it to:
I hope I helped :) PS: none of the other things worked for me. |
Beta Was this translation helpful? Give feedback.
-
Environment
React Native Environment Info:
System:
OS: macOS 10.14
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 2.16 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
Yarn: 1.16.0 - ~/.nvm/versions/node/v10.15.3/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.15.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 25, 27, 28
Build Tools: 27.0.3, 28.0.2, 28.0.3
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.8 => 0.59.8
npmGlobalPackages:
react-native-cli: 2.0.1
Description
I am using aws-sdk (https://github.com/aws/aws-sdk-js) in my react-native project.
After upgrading v0.56.1 to v0.59.8, metro bundler shows error below.
Reproducible Demo
I tested on vanilla RN project (created by react-native init, and added only aws-sdk) and it shows same result.
https://github.com/artechventure/rn59AwsDemo
Beta Was this translation helpful? Give feedback.
All reactions