Kong/insomnia · error
Unsafe yarn path detected.
Error message
Unsafe yarn path detected.
What it means
Error "Unsafe yarn path detected." thrown in Kong/insomnia.
Source
Thrown at packages/insomnia/src/main/install-plugin.ts:334
* Ensures no symlinks and the path is within the app folder.
*/
export async function getYarnPath() {
const SAFE_APP_BASE = path.resolve(__dirname, '..');
const appPath = app.getAppPath();
const resolvedAppPath = path.resolve(appPath);
// Validate app path is safe
if (!resolvedAppPath.startsWith(SAFE_APP_BASE)) {
throw new Error('Unsafe app path detected.');
}
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;
}View on GitHub (pinned to d9bb2b0142)
When it happens
Trigger: Thrown at packages/insomnia/src/main/install-plugin.ts:334 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/84394c2215b01f1d.
Report an issue: GitHub.