I am trying to run tests in the pipeline for a react application. Script looks as below:
Earlier the first three lines weren’t there. I have tried running the command npm install with --force
/--legacy-peer-deps
options as well. No help.
I have also tried changing the node version and docker base image (FROM node:lts
to FROM node:18.20.3-alpine3.20
a working version in an existing similar repo).
script:
- "npm cache clean --force"
- "rm -rf node_modules"
- "rm package-lock.json"
- "npm install"
- "npm test"
Below is the error log I am getting:
Below is the error I am getting after adding –force flag.
npm warn deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error <https://github.com/npm/cli/issues>
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-07-19T15_10_34_356Z-debug-0.log