Problem building dist

Hi all

Can't get npm run dist to work in packages/app-desktop on Linux. Getting tons of C compile warnings culminating in

../src/ note: in expansion of macro ‘BACKUP_BEGIN’
  319 |     BACKUP_BEGIN(Finish);
      |     ^~~~~~~~~~~~
In file included from /home/roman/dev/joplin/packages/app-desktop/node_modules/node-addon-api/napi.h:2636,
                 from ../src/
/home/roman/dev/joplin/packages/app-desktop/node_modules/node-addon-api/napi-inl.h: In instantiation of ‘T* Napi::Env::GetInstanceData() [with T = Napi::FunctionReference]’:
../src/database.h:38:58:   required from here
/home/roman/dev/joplin/packages/app-desktop/node_modules/node-addon-api/napi-inl.h:469:46: error: ‘napi_get_instance_data’ was not declared in this scope; did you mean ‘napi_new_instance’?
  469 |   napi_status status = napi_get_instance_data(_env, &data);
      |                        ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      |                        napi_new_instance
make: *** [ Release/] Error 1

Anyone seen this before?

I haven't seen this error before. Maybe just try to clean the project and rebuild?

Also try with Node 12 as this is what I use and I'm not having any of the errors that have been mentioned in the forum in the past few days.

I also ran into issues with npm 7. I had to downgrade.
Yes, I know it was for another part of Joplin, but who knows...

Tried that a few times.
Found a similar issue in sqlite3 tracker: Fallback to build displays a ton of warnings · Issue #1379 · TryGhost/node-sqlite3 · GitHub
Unfortunately, there's no solution there.

Thanks, will try downgrading node and npm too.

Downgrading node to version 12 didn't help. Will try downgrading npm tomorrow.

Actually after I wiped node_modules and ran npm ci it did work!

Laurent, how do you build windows releases?
I have tried building one on Linux (I'm moving to a new PC running Linux now) and while it builds without errors it looks like the exe ends up broken as it's missing sqlite binaries for Windows.
Is there some trick to that? Or do you build on Windows?