Hey everyone, I was trying to run the frontend in development mode. When I tried yarn build and it failed. The log shows the following:
I kept seeing the error come from postinstall-postinstall. Thank you for helping out.
error /Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/postinstall-postinstall: Command failed.
Exit code: 1
Command: node ./run.js
Arguments:
Directory: /Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/postinstall-postinstall
Output:
SyntaxError: Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in lockfile
at Parser.unexpected (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/@yarnpkg/lockfile/index.js:5064:11)
at Parser.parse (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/@yarnpkg/lockfile/index.js:5193:14)
at parse (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/@yarnpkg/lockfile/index.js:5262:17)
at module.exports.exports.default (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/@yarnpkg/lockfile/index.js:4835:96)
at parseYarnLock (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/yarn-deduplicate/dist/index.js:7:42)
at fixDuplicates (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/yarn-deduplicate/dist/index.js:123:18)
at Object.<anonymous> (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/yarn-deduplicate/dist/cli.js:52:60)
at Module._compile (node:internal/modules/cjs/loader:1565:14)
at Object..js (node:internal/modules/cjs/loader:1708:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
error Command failed with exit code 1.
node:child_process:957
throw err;
^
Error: Command failed: yarn run postinstall
SyntaxError: Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in lockfile
at Parser.unexpected (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/@yarnpkg/lockfile/index.js:5064:11)
at Parser.parse (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/@yarnpkg/lockfile/index.js:5193:14)
at parse (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/@yarnpkg/lockfile/index.js:5262:17)
at module.exports.exports.default (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/@yarnpkg/lockfile/index.js:4835:96)
at parseYarnLock (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/yarn-deduplicate/dist/index.js:7:42)
at fixDuplicates (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/yarn-deduplicate/dist/index.js:123:18)
at Object.<anonymous> (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/yarn-deduplicate/dist/cli.js:52:60)
at Module._compile (node:internal/modules/cjs/loader:1565:14)
at Object..js (node:internal/modules/cjs/loader:1708:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
error Command failed with exit code 1.
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:882:11)
at execSync (node:child_process:954:15)
at Object.<anonymous> (/Users/loyyeeko/Code/OpenSource/contribute/metabase/node_modules/postinstall-postinstall/run.js:15:5)
at Module._compile (node:internal/modules/cjs/loader:1565:14)
at Object..js (node:internal/modules/cjs/loader:1708:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14) {
status: 1,
signal: null,
output: [
null,
Buffer(168) [Uint8Array] [
36, 32, 105, 102, 32, 91, 32, 45, 122, 32, 34, 36,
67, 73, 34, 32, 93, 59, 32, 116, 104, 101, 110, 32,
121, 97, 114, 110, 45, 100, 101, 100, 117, 112, 108, 105,
99, 97, 116, 101, 32, 45, 45, 115, 99, 111, 112, 101,
115, 32, 64, 98, 97, 98, 101, 108, 32, 38, 38, 32,
121, 97, 114, 110, 32, 112, 97, 116, 99, 104, 45, 112,
97, 99, 107, 97, 103, 101, 59, 32, 102, 105, 10, 105,
110, 102, 111, 32, 86, 105, 115, 105, 116, 32, 104, 116,
116, 112, 115, 58,
... 68 more items
],
Buffer(1209) [Uint8Array] [
83, 121, 110, 116, 97, 120, 69, 114, 114, 111, 114, 58,
32, 85, 110, 107, 110, 111, 119, 110, 32, 116, 111, 107,
101, 110, 58, 32, 123, 32, 108, 105, 110, 101, 58, 32,
51, 44, 32, 99, 111, 108, 58, 32, 50, 44, 32, 116,
121, 112, 101, 58, 32, 39, 73, 78, 86, 65, 76, 73,
68, 39, 44, 32, 118, 97, 108, 117, 101, 58, 32, 117,
110, 100, 101, 102, 105, 110, 101, 100, 32, 125, 32, 51,
58, 50, 32, 105, 110, 32, 108, 111, 99, 107, 102, 105,
108, 101, 10, 32,
... 1109 more items
]
],
pid: 25890,
stdout: Buffer(168) [Uint8Array] [
36, 32, 105, 102, 32, 91, 32, 45, 122, 32, 34, 36,
67, 73, 34, 32, 93, 59, 32, 116, 104, 101, 110, 32,
121, 97, 114, 110, 45, 100, 101, 100, 117, 112, 108, 105,
99, 97, 116, 101, 32, 45, 45, 115, 99, 111, 112, 101,
115, 32, 64, 98, 97, 98, 101, 108, 32, 38, 38, 32,
121, 97, 114, 110, 32, 112, 97, 116, 99, 104, 45, 112,
97, 99, 107, 97, 103, 101, 59, 32, 102, 105, 10, 105,
110, 102, 111, 32, 86, 105, 115, 105, 116, 32, 104, 116,
116, 112, 115, 58,
... 68 more items
],
stderr: Buffer(1209) [Uint8Array] [
83, 121, 110, 116, 97, 120, 69, 114, 114, 111, 114, 58,
32, 85, 110, 107, 110, 111, 119, 110, 32, 116, 111, 107,
101, 110, 58, 32, 123, 32, 108, 105, 110, 101, 58, 32,
51, 44, 32, 99, 111, 108, 58, 32, 50, 44, 32, 116,
121, 112, 101, 58, 32, 39, 73, 78, 86, 65, 76, 73,
68, 39, 44, 32, 118, 97, 108, 117, 101, 58, 32, 117,
110, 100, 101, 102, 105, 110, 101, 100, 32, 125, 32, 51,
58, 50, 32, 105, 110, 32, 108, 111, 99, 107, 102, 105,
108, 101, 10, 32,
... 1109 more items
]
node: v22.12.0
which yarn: /opt/homebrew/bin/yarn
yarn version: yarn set version 1.22.22
java: openjdk version "25" 2025-09-16 LTS
OpenJDK Runtime Environment Corretto-25.0.0.36.2 (build 25+36-LTS)
OpenJDK 64-Bit Server VM Corretto-25.0.0.36.2 (build 25+36-LTS, mixed mode, sharing)
javac: javac 25