npm
`npm ERR!` lines. A wrapper: npm reports the failure of the script it ran, never the cause.
jsdepswrappermatcher
Install: ci-doctor matchers add official/npm
matchers/js/npm/matcher.yaml
id: npmrole: wrapperclassification: [js, deps]description: '`npm ERR!` lines. A wrapper: npm reports the failure of the script it ran, never the cause.'pattern: npm ERR!before: 2after: 10
In bundles
Fixtures
Framing stripped per provider. Highlighted lines are what this matcher selects; the marked line is the anchor.
npm_build_failureOpen in playground
1Current runner version: '2.336.0'
2##[group]Operating System
3Ubuntu
424.04.4
5LTS
6##[endgroup]
7Secret source: Actions
8Prepare workflow directory
9Prepare all required actions
10Complete job name: npm_build_failure
11##[group]Set up job
12Image: ubuntu-24.04
13Runner name: 'GitHub Actions 12'
14##[endgroup]
15Download action repository 'actions/checkout@v4'
16Download action repository 'actions/cache@v4'
17##[group]Run actions/checkout@v4
18 with:
19 fetch-depth: 20
20 lfs: false
21##[endgroup]
22Syncing repository: acme/ledger
23##[group]Getting Git version info
24Working directory is '/home/runner/work/ledger/ledger'
25##[endgroup]
26/usr/bin/git checkout --progress --force 8ad41f02
27##[group]Run actions/cache@v4
28 with:
29 path: ~/.cache
30 key: Linux-deps-8ad41f02
31##[endgroup]
32Received 41943040 of 41943040 (100.0%), 40.0 MBs/sec
33Cache restored from key: Linux-deps-8ad41f02
34##[group]Run node --version
35node --version
36npm ci --no-audit --no-fund
37npm run build
38shell: /usr/bin/bash -e {0}
39##[endgroup]
40v20.11.1
41added 1284 packages in 21s
42> web-dashboard@2.3.0 build
43> tsc -p tsconfig.build.json && vite build
44src/services/report.ts:88:23 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
45 Type 'undefined' is not assignable to type 'string'.
46
4788 return normalizeUrl(config.apiBase);
48 ~~~~~~~~~~~~~~
49src/services/report.ts:132:7 - error TS2739: Type '{ id: string; }' is missing the following properties from type 'Report': summary, phase
50
51132 report,
52 ~~~~~~
53
54Found 2 errors in the same file, starting at src/services/report.ts:88
55npm ERR! Lifecycle script `build` failed with error:
56npm ERR! code 2
57npm ERR! path /builds/team/web-dashboard
58npm ERR! workspace web-dashboard@2.3.0
59##[error]Process completed with exit code 2.
60##[group]Post Run actions/checkout@v4
61##[endgroup]
62/usr/bin/git version
63git version 2.54.0
64##[group]Post Run actions/upload-artifact@v4
65##[endgroup]
66Artifact upload complete.
67##[warning]dist/: no matching files. Ensure that the artifact path is relative to the working directory
68Post job cleanup.
69Cleaning up orphan processes
1Running with gitlab-runner 16.10.0 (be4e0e33)
2 on green-4.saas-linux-medium-amd64 Kd8f2Lp1, system ID: s_9f8e7d6c5b4a
3Preparing the "docker+machine" executor
4 Using Docker executor with image node:20-alpine ...
5Resolving secrets
6Using Docker executor with image node:20-alpine ...
7Pulling docker image node:20-alpine ...
8Using docker image sha256:1122334455aa for node:20-alpine with digest node@sha256:ffee...
9Preparing environment
10Running on runner-kd8f2lp1-project-88-concurrent-0...
11Fetching changes...
12Checking out 4b17aa90 as detached HEAD...
13Skipping Git submodules setup
14Checking cache for node-modules-20-default...
15Downloading cache.zip from https://storage.internal/runner/cache/...
16Successfully extracted cache
17$ node --version
18v20.11.1
19$ npm ci --no-audit --no-fund
20added 1284 packages in 21s
21$ npm run build
22> web-dashboard@2.3.0 build
23> tsc -p tsconfig.build.json && vite build
24src/services/report.ts:88:23 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
25 Type 'undefined' is not assignable to type 'string'.
26
2788 return normalizeUrl(config.apiBase);
28 ~~~~~~~~~~~~~~
29src/services/report.ts:132:7 - error TS2739: Type '{ id: string; }' is missing the following properties from type 'Report': summary, phase
30
31132 report,
32 ~~~~~~
33
34Found 2 errors in the same file, starting at src/services/report.ts:88
35npm ERR! Lifecycle script `build` failed with error:
36npm ERR! code 2
37npm ERR! path /builds/team/web-dashboard
38npm ERR! workspace web-dashboard@2.3.0
39Running after_script
40$ echo "build failed, skipping deploy"
41build failed, skipping deploy
42Uploading artifacts for failed job
43WARNING: dist/: no matching files. Ensure that the artifact path is relative to the working directory
44ERROR: Job failed: exit code 2