Error "JavaScript heap out of memory" in v15.1.0
haddasbronfman opened this issue · comments
Haddas Bronfman commented
Link to bug demonstration repository
https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main
steps to reproduce:
- clone the above project (opentelemetry-js-contrib)
- run:
npm install --ignore-scripts
- run:
npx lerna bootstrap --no-ci --hoist --nohoist=‘zone.js’ --nohoist=‘mocha’ --nohoist=‘ts-mocha’
- run:
cd plugins/node/opentelemetry-instrumentation-mongodb/
- run:
export RUN_MONGODB_TESTS=1
- from another terminal, run
cd plugins/node/opentelemetry-instrumentation-mongodb/examples
and run:npm run docker:start
. this will start mongodb docker. - run:
npm run test
Expected Behavior
tests should run
Observed Behavior
Troubleshooting steps
- [ V] still occurring when I run
NODE_OPTIONS=--max-old-space-size=4096 nyc ts-mocha...
instead ofnyc ts-mocha...
Cookie commented
We also faced this issue
RobertInAms commented
We have discovered the following :
For one of our projects, after an upgrade cycle, nyc suddenly started using 8GB which would crash our build pipeline. Investigation showed we had some unnecessary peerDependencies. We removed them and now nyc is running fast and efficient.
We think there must have been some circular dependency