laurent22/joplin · error · Error

Please specify the sync target path.

Error message

Please specify the sync target path.

What it means

In the 'e2ee target-status' sub-command, the target sync path is read from args.path. If no path was supplied the command throws 'Please specify the sync target path.' Note this message is NOT wrapped in _(), so it is not i18n-translated unlike most others.

Source

Thrown at packages/app-cli/app/command-e2ee.ts:177

		// if (args.command === 'generate-ppk') {
		// 	const syncInfo = localSyncInfo();
		// 	if (syncInfo.ppk) throw new Error('This account already has a public-private key pair');

		// 	const argPassword = options.password ? options.password.toString() : '';
		// 	if (!argPassword) throw new Error('Password must be provided'); // TODO: should get from prompt
		// 	const ppk = await generateKeyPair(EncryptionService.instance(), argPassword);

		// 	syncInfo.ppk = ppk;
		// 	saveLocalSyncInfo(syncInfo);
		// 	await Setting.saveAll();
		// }

		if (args.command === 'target-status') {
			const fs = require('fs-extra');

			const targetPath = args.path;
			if (!targetPath) throw new Error('Please specify the sync target path.');

			const dirPaths = function(targetPath: string) {
				const paths: string[] = [];
				// eslint-disable-next-line github/array-foreach -- Old code before rule was applied
				fs.readdirSync(targetPath).forEach((path: string) => {
					paths.push(path);
				});
				return paths;
			};

			let itemCount = 0;
			let resourceCount = 0;
			let encryptedItemCount = 0;
			let encryptedResourceCount = 0;
			let otherItemCount = 0;

			const encryptedPaths = [];
			const decryptedPaths = [];

View on GitHub (pinned to 2654b33620)

Solutions

  1. Supply the path: 'e2ee target-status -p /path/to/sync/target'.
  2. Run 'e2ee target-status --help' to confirm the expected flag.
  3. Ensure the directory exists and is the configured filesystem sync target.

Example fix

# before
#   joplin e2ee target-status
# after
#   joplin e2ee target-status -p /home/me/JoplinSync
Defensive patterns

Strategy: validation

Validate before calling

if (args.command === 'target-status' && !args.path) {
  throw new Error('Usage: e2ee target-status -p <sync-target-path>');
}

Prevention

When it happens

Trigger: Running 'e2ee target-status' without a -p/--path argument pointing at the local-filesystem sync target directory.

Common situations: Forgetting the path flag; using a sync target type (e.g. WebDAV/OneDrive) for which target-status does not apply; misreading the help text.

Related errors


AI-assisted analysis of laurent22/joplin@2654b33620 (2026-08-12). Data as JSON: /api/errors/71671d9f2bb1581c. Report an issue: GitHub.