Pipeline failed unit tests

I’m on the course “Adding framework to pipeline” and ive been struggling to get my unit check passed. Iv’e been trying everything. Even restarted from scratch but can’t seem to be able to resolve the sync problems between package.json and Package.lock…
Can someone help?

Run npm ci
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @apideck/better-ajv-errors@0.3.6
npm warn Found: ajv@6.12.6
npm warn node_modules/ajv
npm warn   dev ajv@"^6.12.6" from the root project
npm warn   6 more (@eslint/eslintrc, ajv-keywords, schema-utils, eslint, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer ajv@">=8" from @apideck/better-ajv-errors@0.3.6
npm warn node_modules/@apideck/better-ajv-errors
npm warn   @apideck/better-ajv-errors@"^0.3.1" from workbox-build@6.6.0
npm warn   node_modules/workbox-build
npm warn
npm warn Conflicting peer dependency: ajv@8.17.1
npm warn node_modules/ajv
npm warn   peer ajv@">=8" from @apideck/better-ajv-errors@0.3.6
npm warn   node_modules/@apideck/better-ajv-errors
npm warn     @apideck/better-ajv-errors@"^0.3.1" from workbox-build@6.6.0
npm warn     node_modules/workbox-build
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: jest-watch-typeahead@1.1.0
npm warn Found: jest@30.2.0
npm warn node_modules/jest
npm warn   jest@"^30.2.0" from the root project
npm warn
npm warn Could not resolve dependency:
npm warn peer jest@"^27.0.0 || ^28.0.0" from jest-watch-typeahead@1.1.0
npm warn node_modules/jest-watch-typeahead
npm warn   jest-watch-typeahead@"^1.0.0" from react-scripts@5.0.1
npm warn   node_modules/react-scripts
npm warn
npm warn Conflicting peer dependency: jest@28.1.3
npm warn node_modules/jest
npm warn   peer jest@"^27.0.0 || ^28.0.0" from jest-watch-typeahead@1.1.0
npm warn   node_modules/jest-watch-typeahead
npm warn     jest-watch-typeahead@"^1.0.0" from react-scripts@5.0.1
npm warn     node_modules/react-scripts
npm error code EUSAGE
npm error
npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm error
npm error Missing: @types/react@18.3.27 from lock file
npm error Missing: @types/prop-types@15.7.15 from lock file
npm error Invalid: lock file's picomatch@2.3.1 does not satisfy picomatch@4.0.3
npm error Missing: picomatch@2.3.1 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error Invalid: lock file's yaml@1.10.2 does not satisfy yaml@2.8.2
npm error Missing: yaml@1.10.2 from lock file
npm error Missing: yaml@1.10.2 from lock file
npm error Missing: yaml@1.10.2 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error Missing: picomatch@2.3.1 from lock file
npm error
npm error Clean install a project
npm error
npm error Usage:
npm error npm ci
npm error
npm error Options:
npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm error [--no-bin-links] [--no-fund] [--dry-run]
npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm error
npm error aliases: clean-install, ic, install-clean, isntall-clean
npm error
npm error Run "npm help ci" for more info
npm error A complete log of this run can be found in: C:\npm\cache\_logs\2026-01-04T12_03_19_813Z-debug-0.log

> timesheet-manager@0.1.0 test
> react-scripts test --reporters=default --reporters=jest-junit --reporters=jest-junit

'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
Error: Process completed with exit code 1.

I’m not familiar with the project but I’d try deleting the package.lock file and running npm install to generate a new package.lock file and hopefully resolve the package dependencies.

1 Like