Apresentou o seguinte erro:
2s Run npm install npm error code ENOENT npm error syscall open npm error path /home/runner/work/allbooks/allbooks/package.json npm error errno -2 npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/home/runner/work/allbooks/allbooks/package.json' npm error enoent This is related to npm not being able to find a file. npm error enoent npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2025-07-09T02_55_15_556Z-debug-0.log Error: Process completed with exit code 254.
Meu arquivo em YAML ficou o seguinte:
This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Workflow de integração Continua
on: pull_request: branches: [ "main" ]
jobs: testes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22.17.0
- run: npm install
- run: npm run build --if-present
- run: npm test