Kong/insomnia · error
yarn-standalone.js not found at expected location
Error message
yarn-standalone.js not found at expected location: ${yarnPath} What it means
Guard in getYarnPath: the bundled yarn-standalone.js was not found where the app layout expects it (ENOENT on lstat). The expected path is interpolated; indicates a broken or incomplete app installation/package layout.
Solutions
- Reinstall/repair the application to restore bin/yarn-standalone.js
- Check that antivirus or packaging didn't strip the bin directory
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/insomnia/src/main/install-plugin.ts:346 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26).
Data as JSON: /api/errors/8e94e45252f0a7e7.
Report an issue: GitHub.
Appendix: source
Thrown at packages/insomnia/src/main/install-plugin.ts:346
const yarnPath = isDevelopment()
? path.resolve(resolvedAppPath, './bin/yarn-standalone.js')
: path.resolve(resolvedAppPath, '../bin/yarn-standalone.js');
if (!yarnPath.startsWith(SAFE_APP_BASE)) {
throw new Error('Unsafe yarn path detected.');
}
// Ensure file exists and is not a symlink
try {
const stats = await lstat(yarnPath);
if (stats.isSymbolicLink()) {
throw new Error('yarn-standalone.js is a symlink, refusing to use it.');
}
} catch (err: any) {
if (err.code === 'ENOENT') {
throw new Error(`yarn-standalone.js not found at expected location: ${yarnPath}`);
}
throw err;
}
return yarnPath;
}
/**
* Checks if the Yarn stderr output only contains deprecation warnings.
*/
export function containsOnlyDeprecationWarnings(output: string): boolean {
const MAX_LINES = 20;
const MAX_LINE_LENGTH = 300;
if (!output) return true;
if (hasUnexpectedBinaryData(output)) {
return false; // Contains unexpected binary dataView on GitHub (pinned to d9bb2b0142)