Can't generate a Joplin plugin skeleton with "yo joplin"

Iโ€™m on Ubuntu 24.04.4 LTS. I installed the most recent version of Node and did this in the folder in which I want to develop a plugin:

  1. npm init -y
  2. npm install yo generator-joplin --save-dev
  3. npx yo joplin

But now no plugin skeleton is generated, because I run into this error: SyntaxError: Unexpected token 'with', triggered by node_modules/cli-spinners/index.js:1 : import spinners from './spinners.json' with {type: 'json'};

My questions:

  • does somebody know how to fix this?
  • or maybe even better: can someone post a working plugin skeleton in a zip file, so I donโ€™t need to use the skeleton generator scripts at all?

Hey @smartscripts-nl, here you go!

skeleton-plugin.zip (73.2 KB)

Really sorry, I'm not 100% sure about how to fix that specific error since I develop on Windows, not Ubuntu. But looking at the output, it most likely seems like a Node.js version mismatch issue between your system and the generator package.

Hopefully, this zip file gets you unblocked for now so you don't have to deal with the generator and can just start coding!

Good luck with the plugin!

Thank you very much! Iโ€™ll try to develop the plugin using this skeleton.

1 Like

Does it make any difference if you install yo generator-joplin globally and run just yo joplin, per the documentation here?: Getting started with plugin development | Joplin

Seems to work without issue here on ubuntu with node 24.13:

brandon@brandon-X570-UD:~/Projects/joplin-plugins/Test$ yo joplin

     _-----_     
    |       |    โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
    |--(o)--|    โ”‚    Welcome to the fine   โ”‚
   `---------ยด   โ”‚ Joplin Plugin generator! โ”‚
    ( _ยดU`_ )    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
    /___A___\   /
     |  ~  |     
   __'.___.'__   
 ยด   `  |ยฐ ยด Y ` 

โœ” Plugin ID
  Must be a globally unique ID such as "com.example.MyPlugin" or a UUID: bwat47-test
โœ” Plugin name
  User-friendly string which will be displayed in UI: bwat47-test
โœ” Plugin description: bwat47-test
โœ” Author: bwat47
โœ” Repository URL: 
โœ” Homepage URL: 
โœ” The npm package will be named: "joplin-plugin-bwat47-test"
  Press ENTER to keep this default, or type a name to change it: 
   create package.json
identical .gitignore
identical .npmignore
   create GENERATOR_DOC.md
   create tsconfig.json
   create webpack.config.js
   create plugin.config.json
   create src/index.ts
   create src/manifest.json
   create README.md
   create api/Global.d.ts
   create api/Joplin.d.ts
   create api/JoplinClipboard.d.ts
   create api/JoplinCommands.d.ts
   create api/JoplinContentScripts.d.ts
   create api/JoplinData.d.ts
   create api/JoplinFilters.d.ts
   create api/JoplinImaging.d.ts
   create api/JoplinInterop.d.ts
   create api/JoplinPlugins.d.ts
   create api/JoplinSettings.d.ts
   create api/JoplinViews.d.ts
   create api/JoplinViewsDialogs.d.ts
   create api/JoplinViewsEditor.d.ts
   create api/JoplinViewsMenuItems.d.ts
   create api/JoplinViewsMenus.d.ts
   create api/JoplinViewsNoteList.d.ts
   create api/JoplinViewsPanels.d.ts
   create api/JoplinViewsToolbarButtons.d.ts
   create api/JoplinWindow.d.ts
   create api/JoplinWorkspace.d.ts
   create api/index.ts
   create api/noteListType.d.ts
   create api/noteListType.ts
   create api/types.ts

Changes to package.json were detected.
Error detecting the package manager. Falling back to npm.

Running npm install for you to install the required dependencies.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@8.1.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated tar@6.2.1: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me

> joplin-plugin-bwat47-test@1.0.0 prepare
> npm run dist


> joplin-plugin-bwat47-test@1.0.0 dist
> webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive

Plugin archive has been created in /home/brandon/Projects/joplin-plugins/Test/publish/bwat47-test.jpl
Could not get git commit (not a git repo?): Command failed: git rev-parse --abbrev-ref HEAD
Git information will not be stored in plugin info file

added 175 packages, and audited 176 packages in 4s

28 packages are looking for funding
  run `npm fund` for details

3 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
brandon@brandon-X570-UD:~/Projects/joplin-plugins/Test$ node -v
v24.13.0

No, when installing globally I had the same problem. Thatโ€™s why I went from installing globally to locally, only to be confronted with the same problem.

Aha, I had installed node using โ€œsudo apt install nodejsโ€ and I assumed that I would then have the most recent version. But it was 18.19.1, so much older than the version you mentioned. After installing Node 24.13.0 using nvm, all now works just as it should. So thank you very much!

3 Likes