Started getting this error when i ran yarn test in node 20.14 as i wanted to upgrade my node version from 14 to 20.14
my package.json –
<code>{
"main": "server.js",
"license": "MIT",
"dependencies": {
"@google-cloud/storage": "5.8.4",
"@sendgrid/mail": "^7.4.2",
"adm-zip": "^0.5.9",
"axios": "0.21.4",
"body-parser": "1.19.0",
"bunyan": "1.8.15",
"consul": "^0.40.0",
"cors": "2.8.5",
"couchbase": "4.2.5",
"crypto-random-int": "1.0.1",
"csv-stream": "^0.2.0",
"csv-writer": "^1.6.0",
"csvtojson": "2.0.10",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"elastic-apm-node": "4.7.1",
"express": "4.17.3",
"express-requests-logger": "4.0.0",
"find-config": "1.0.0",
"firebase": "8.2.3",
"firebase-admin": "9.4.2",
"jest": "^29.5.0",
"jest-html-reporters": "^3.1.4",
"joi": "^17.6.0",
"json2csv": "5.0.6",
"jwt-decode": "3.0.0-beta.2",
"kafkajs": "^1.15.0",
"lodash": "^4.17.21",
"memory-cache": "0.2.0",
"moment": "2.29.4",
"mongodb": "6.8.0",
"multer": "1.4.2",
"nodemon": "2.0.4",
"objects-to-csv": "1.3.6",
"serialize-error": "8.0.1",
"through2": "^4.0.2",
"unirest": "^0.6.0"
},
"scripts": {
"test": "jest --runInBand",
"start": "NODE_ENV=development nodemon server.js",
"start:local": "NODE_ENV=local nodemon server.js",
"start:production": "node server.js"
},
"devDependencies": {
"jest": "^29.5.0",
"supertest": "^6.3.3"
}
}
</code>
<code>{
"main": "server.js",
"license": "MIT",
"dependencies": {
"@google-cloud/storage": "5.8.4",
"@sendgrid/mail": "^7.4.2",
"adm-zip": "^0.5.9",
"axios": "0.21.4",
"body-parser": "1.19.0",
"bunyan": "1.8.15",
"consul": "^0.40.0",
"cors": "2.8.5",
"couchbase": "4.2.5",
"crypto-random-int": "1.0.1",
"csv-stream": "^0.2.0",
"csv-writer": "^1.6.0",
"csvtojson": "2.0.10",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"elastic-apm-node": "4.7.1",
"express": "4.17.3",
"express-requests-logger": "4.0.0",
"find-config": "1.0.0",
"firebase": "8.2.3",
"firebase-admin": "9.4.2",
"jest": "^29.5.0",
"jest-html-reporters": "^3.1.4",
"joi": "^17.6.0",
"json2csv": "5.0.6",
"jwt-decode": "3.0.0-beta.2",
"kafkajs": "^1.15.0",
"lodash": "^4.17.21",
"memory-cache": "0.2.0",
"moment": "2.29.4",
"mongodb": "6.8.0",
"multer": "1.4.2",
"nodemon": "2.0.4",
"objects-to-csv": "1.3.6",
"serialize-error": "8.0.1",
"through2": "^4.0.2",
"unirest": "^0.6.0"
},
"scripts": {
"test": "jest --runInBand",
"start": "NODE_ENV=development nodemon server.js",
"start:local": "NODE_ENV=local nodemon server.js",
"start:production": "node server.js"
},
"devDependencies": {
"jest": "^29.5.0",
"supertest": "^6.3.3"
}
}
</code>
{
"main": "server.js",
"license": "MIT",
"dependencies": {
"@google-cloud/storage": "5.8.4",
"@sendgrid/mail": "^7.4.2",
"adm-zip": "^0.5.9",
"axios": "0.21.4",
"body-parser": "1.19.0",
"bunyan": "1.8.15",
"consul": "^0.40.0",
"cors": "2.8.5",
"couchbase": "4.2.5",
"crypto-random-int": "1.0.1",
"csv-stream": "^0.2.0",
"csv-writer": "^1.6.0",
"csvtojson": "2.0.10",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"elastic-apm-node": "4.7.1",
"express": "4.17.3",
"express-requests-logger": "4.0.0",
"find-config": "1.0.0",
"firebase": "8.2.3",
"firebase-admin": "9.4.2",
"jest": "^29.5.0",
"jest-html-reporters": "^3.1.4",
"joi": "^17.6.0",
"json2csv": "5.0.6",
"jwt-decode": "3.0.0-beta.2",
"kafkajs": "^1.15.0",
"lodash": "^4.17.21",
"memory-cache": "0.2.0",
"moment": "2.29.4",
"mongodb": "6.8.0",
"multer": "1.4.2",
"nodemon": "2.0.4",
"objects-to-csv": "1.3.6",
"serialize-error": "8.0.1",
"through2": "^4.0.2",
"unirest": "^0.6.0"
},
"scripts": {
"test": "jest --runInBand",
"start": "NODE_ENV=development nodemon server.js",
"start:local": "NODE_ENV=local nodemon server.js",
"start:production": "node server.js"
},
"devDependencies": {
"jest": "^29.5.0",
"supertest": "^6.3.3"
}
}
I am using Mac M3 Chip and I tried upgrading the node version from 14 to 20.14 and tried to run yarn test but it threw this error – error Command failed with signal “SIGSEGV”.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
With node 14 it works fine.
The dependencies i upgraded –
Couchbase – 3.1.3 to 4.2.5
elastic-apm-node – 3.9.0 to 4.7.1
mongodb – 3.6.4 to 6.8.0
Please click on the title to see the attached image . Please help!
6