Error on build

Description

I am trying to package Mailspring for Alpine Linux. To build the software AFAIK I have basically 2 commands to run:

npm install
npm run-script build

However I have this error on the first command:

-- Downloading the last released version of Mailspring mailsync --
error: pathspec './mailsync' did not match any file(s) known to git
node:internal/errors:932
  const err = new Error(message);
              ^

Error: Command failed: git submodule status ./mailsync
error: pathspec './mailsync' did not match any file(s) known to git

I can share my build log file if needed.

Setup

  • OS and Version: Alpine Linux (edge version)
    • Installation Method: source
  • Mailspring Version: 1.13.3

Which node version are you using trying to build Mailspring?

I tried with 20.11.0 and 21.6.1, both are packaged in the distribution repos.

Can you please run npm run build instead of run-script. The node version that I use for building successfully is v18.18.2.

Same error with npm run build.

Did you try it with node 18?

I can’t. For packaging I have to use packaged build tools, and node 18 isn’t available anymore on edge branch.

Let me try it with the newer buffer version. However I won’t get to this before the weekend.

1 Like

Does not seem to be the node version. I can run and build with node version 20 and 21.

Can you please check if mailsync has been properly downloaded?

➜  Mailspring git:(master) ls mailsync 
build.cmd  BUILDING.md  build.sh  CMakeLists.txt  CODE_OF_CONDUCT.md  CONTRIBUTING.md  LICENSE.md  MailSync  MailSync.xcodeproj  README.md  Vendor  Windows
1 Like

I build from the release tarball available on GitHub release page.

Do I need to download another tarball from elsewhere?

Edit: I finally understood what you were asking. The directory is empty. It seems it would be working from a git clone but not from the release tarball.

2 Likes

Yes. When you clone it from git, the mailsync dependency will be downloaded automatically.

That does not happen if you download the tar manually.

So what should I do to build it from tarball?

Download the correct version of mailsync, I think. I have never done so though.