laurent22/joplin · error · Error
This plugin name cannot be converted to a package name: ${pl
Error message
This plugin name cannot be converted to a package name: ${pluginName} What it means
Thrown by packageNameFromPluginName() in generator-joplin utils.js. The plugin name is run through a special-character replace and slugify; if the result is an empty string, the name cannot become a valid npm package name and the generator aborts. The prefix `joplin-plugin-` is added only after this check, so a fully-empty slug never reaches it.
Source
Thrown at packages/generator-joplin/generators/app/utils.js:64
return `${output.filter((item, pos) => {
if (!item) return true; // Leave blank lines
return output.indexOf(item) === pos;
}).join('\n').trim()}\n`;
}
function packageNameFromPluginName(pluginName) {
let output = pluginName;
// Replace all special characters with '-'
output = output.replace(/[*+~.()'"!:@[\]]/g, '-');
// Slugify to replace non-alphabetical characters by letters
output = slugify(output, { lower: true });
// Trim any remaining "-" from beginning of string
output = output.replace(/^[-]+/, '');
if (!output) throw new Error(`This plugin name cannot be converted to a package name: ${pluginName}`);
// Add prefix
output = `joplin-plugin-${output}`;
// Package name is limited to 214 characters
output = output.substr(0, 214);
// Trim any remaining "-" from end of string
output = output.replace(/[-]+$/, '');
return output;
}
module.exports = { mergePackageKey, mergeIgnoreFile, packageNameFromPluginName };
View on GitHub (pinned to 2654b33620)
Solutions
- Re-run the generator and enter a plugin name containing at least one ASCII letter or number (e.g. "My Cool Plugin").
- Avoid names made only of symbols, emoji, or whitespace.
- If a non-Latin name is desired, append a transliterated ASCII portion so the slug is non-empty.
Example fix
# before ? Plugin name: ✨✨✨ # after ? Plugin name: Star Notes
Defensive patterns
Strategy: validation
Validate before calling
// Before calling the generator, sanity-check the proposed name slugifies to non-empty.
const slugify = require('slugify');
const slugified = slugify(pluginName.replace(/[*+~.()'"!:@[\]]/g, '-'), { lower: true }).replace(/^-+/, '');
if (!slugified) throw new Error('Plugin name has no usable characters for a package name'); Type guard
const isUsablePluginName = (name) => !!slugify(name.replace(/[*+~.()'"!:@[\]]/g, '-'), { lower: true }).replace(/^-+/, ''); Try / catch
try { packageNameFromPluginName(name); }
catch (e) { if (/cannot be converted to a package name/.test(e.message)) { /* ask for a new name */ } else throw e; } Prevention
- When scaffolding interactively, validate the name live and reject emoji/punctuation-only input.
- Suggest an ASCII fallback for non-Latin names so the slug is never empty.
When it happens
Trigger: User runs yo joplin (or the generator programmatically) and enters a plugin name consisting entirely of characters that slugify strips — e.g. only symbols, only emoji, only CJK that slugify removes, or only whitespace.
Common situations: Plugin name is pure punctuation or a single emoji; name is empty; name uses a script slugify does not transliterate.
Related errors
- Failed to extract a valid commit hash. Ensure that git is pr
- You are in a detached HEAD state. Checkout a branch (e.g. gi
- Remote HEAD is empty. Make sure you have pushed your changes
- Unexpected git ls-remote output: "${remoteHeadLine}". Make s
- Failed to extract a valid remote commit hash.
AI-assisted analysis of laurent22/joplin@2654b33620 (2026-08-12).
Data as JSON: /api/errors/e012a2e48dd6ca53.
Report an issue: GitHub.