Building mailspring from source

To Reproduce…

  1. Install all dependencies for building mailspring
  2. git clone https://github.com/foundry376/mailspring
  3. cd mailspring
  4. npm install

Expected Behavior

Successful build

Log

Cloning into 'mailspring'...
remote: Enumerating objects: 98665, done.
remote: Counting objects: 100% (552/552), done.
remote: Compressing objects: 100% (366/366), done.
remote: Total 98665 (delta 217), reused 447 (delta 176), pack-reused 98113
Receiving objects: 100% (98665/98665), 110.71 MiB | 2.18 MiB/s, done.
Resolving deltas: 100% (64950/64950), done.
npm WARN deprecated @types/keytar@4.4.2: This is a stub types definition. keytar provides its own type definitions, so you do not need this installed.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated cheerio-select-tmp@0.1.1: Use cheerio-select instead
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.3.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest

> mailspring-root@0.0.1 postinstall
> node scripts/postinstall.js


-- Clearing app/node_modules (false !== 8.5.5) --

-- Running npm install --no-audit in ./app with electron config --
npm ERR! code 1
npm ERR! path .../mailspring/app/node_modules/cld
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild

Setup

  • OS and Version: Archlinux (up to date as of 31. 10. 2021)
  • Installation Method: My own build
  • Mailspring Version: Latest from Github repository (as of 31. 10. 2021)

PS: ... in dir path means my projects folder - replaced just to be sure

Which node/npm version are you using? node-gyp is sometimes producing problems, when an incompatible node version is used.

Description

I try to build mailspring according to this I installed all the dependencies and I have problem with node modules when I run npm install. The problem is that modules get installed into current directory (mailspring root) and then I get error that .../mailspring/node_modules/cld doesn’t exist. So I cd app and try npm install there. The directory appears, but when it comes to installing mailspring the folder get’s deleted and throws error that the command .../mailspring/node_modules/cldfailed - the node_modules folder doesn’t exist

To Reproduce…

  1. Install all dependencies for building mailspring
  2. git clone https://github.com/foundry376/mailspring
  3. cd mailspring
  4. npm install

Expected Behavior

Successful build

Log

Cloning into 'mailspring'...
remote: Enumerating objects: 98665, done.
remote: Counting objects: 100% (552/552), done.
remote: Compressing objects: 100% (366/366), done.
remote: Total 98665 (delta 217), reused 447 (delta 176), pack-reused 98113
Receiving objects: 100% (98665/98665), 110.71 MiB | 2.18 MiB/s, done.
Resolving deltas: 100% (64950/64950), done.
npm WARN deprecated @types/keytar@4.4.2: This is a stub types definition. keytar provides its own type definitions, so you do not need this installed.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated cheerio-select-tmp@0.1.1: Use cheerio-select instead
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.3.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest

> mailspring-root@0.0.1 postinstall
> node scripts/postinstall.js


-- Clearing app/node_modules (false !== 8.5.5) --

-- Running npm install --no-audit in ./app with electron config --
npm ERR! code 1
npm ERR! path .../mailspring/app/node_modules/cld
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild

Setup

  • OS and Version: Archlinux (up to date as of 31. 10. 2021)
  • Installation Method: My own build
  • Mailspring Version: Latest from Github repository (as of 31. 10. 2021)

PS: ... in dir path means my projects folder - replaced just to be sure

Please, I need help with this. I want to play around with the client and understand how it works…

Rly noone after a month? I thought I found a great email client with good community, but I’m starting to think otherwise…

One and a half month… come on…

@jiriks74 Sorry for the late response. See: Building mailspring from source - #2 by Phylu

node: v17.3.0
npm: 8.3.0
node-gyp: v8.4.1

Sorry for what I said, i really frustrated…

@jiriks74 Your node version is too new for the master branch of Mailspring. Try node 12 or so. Unfortunately I don’t remember what worked and don’t have my dev machine with me for Christmas.

O am currently working mainly on this branch, where I adjusted the build instructions according to what worked for me: https://github.com/Phylu/Mailspring/blob/9660ef7c1cac134b51cb64409ae3cf8c45e6df7b/CONTRIBUTING.md

I hope, this helps! :slight_smile:

As mentioned here I have node: v16.13.2 and npm: 8.1.2

After running npm install I get the following output:

> mailspring-root@0.0.1 postinstall
> node scripts/postinstall.js


-- Clearing app/node_modules (false !== 8.5.5) --

-- Running npm install --no-audit in ./app with electron config --
npm ERR! code 1
npm ERR! path /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil_shared.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_hint_code.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_impl.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/debug.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/fixunicodevalue.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_entities.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_language.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_ulscript.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/getonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/lang_script.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/offsetmap.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/scoreonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/tote.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/utf8statetable.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_uni_prop_80.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_cjk_compatible.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_delta_bi_32.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_distinct_bi_0.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quad0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_16.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_2.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_2.o
npm ERR!   AR(target) Release/obj.target/deps/cld/cld-c.a
npm ERR!   COPY Release/cld-c.a
npm ERR!   CXX(target) Release/obj.target/cld/src/constants.o
npm ERR!   CXX(target) Release/obj.target/cld/src/cld.o
npm ERR! make: Leaving directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.13.2 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.1 found at "/usr/bin/python3"
npm ERR! (node:85531) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/jirka/Programs/Mailspring/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/jirka/Programs/Mailspring/app/node_modules/cld/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/jirka/Programs/Mailspring/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/jirka/.cache/node-gyp/8.5.5/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/jirka/.cache/node-gyp/8.5.5',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/jirka/Programs/Mailspring/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/jirka/.cache/node-gyp/8.5.5/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/jirka/Programs/Mailspring/app/node_modules/cld',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/cld.cc:5:12: error: ‘terminate_handler’ has not been declared in ‘std’
npm ERR!     5 | using std::terminate_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~
npm ERR! ../src/cld.cc:6:12: error: ‘unexpected_handler’ has not been declared in ‘std’
npm ERR!     6 | using std::unexpected_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~~
npm ERR! make: *** [cld.target.mk:113: Release/obj.target/cld/src/cld.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/jirka/Programs/Mailspring/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.16.1-zen1-1-zen
npm ERR! gyp ERR! command "/home/jirka/.nvm/versions/node/v16.13.2/bin/node" "/home/jirka/Programs/Mailspring/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jirka/.npm/_logs/2022-01-20T17_49_03_335Z-debug.log
safeExec: the command exited with Error: Command failed: npm install --no-audit
npm ERR! code 1
npm ERR! path /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil_shared.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_hint_code.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_impl.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/debug.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/fixunicodevalue.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_entities.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_language.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_ulscript.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/getonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/lang_script.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/offsetmap.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/scoreonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/tote.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/utf8statetable.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_uni_prop_80.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_cjk_compatible.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_delta_bi_32.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_distinct_bi_0.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quad0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_16.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_2.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_2.o
npm ERR!   AR(target) Release/obj.target/deps/cld/cld-c.a
npm ERR!   COPY Release/cld-c.a
npm ERR!   CXX(target) Release/obj.target/cld/src/constants.o
npm ERR!   CXX(target) Release/obj.target/cld/src/cld.o
npm ERR! make: Leaving directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.13.2 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.1 found at "/usr/bin/python3"
npm ERR! (node:85531) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/jirka/Programs/Mailspring/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/jirka/Programs/Mailspring/app/node_modules/cld/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/jirka/Programs/Mailspring/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/jirka/.cache/node-gyp/8.5.5/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/jirka/.cache/node-gyp/8.5.5',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/jirka/Programs/Mailspring/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/jirka/.cache/node-gyp/8.5.5/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/jirka/Programs/Mailspring/app/node_modules/cld',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/cld.cc:5:12: error: ‘terminate_handler’ has not been declared in ‘std’
npm ERR!     5 | using std::terminate_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~
npm ERR! ../src/cld.cc:6:12: error: ‘unexpected_handler’ has not been declared in ‘std’
npm ERR!     6 | using std::unexpected_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~~
npm ERR! make: *** [cld.target.mk:113: Release/obj.target/cld/src/cld.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/jirka/Programs/Mailspring/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.16.1-zen1-1-zen
npm ERR! gyp ERR! command "/home/jirka/.nvm/versions/node/v16.13.2/bin/node" "/home/jirka/Programs/Mailspring/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jirka/.npm/_logs/2022-01-20T17_49_03_335Z-debug.log
1
`------------- stderr ------------
npm ERR! code 1
npm ERR! path /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil_shared.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_hint_code.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_impl.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/debug.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/fixunicodevalue.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_entities.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_language.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_ulscript.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/getonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/lang_script.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/offsetmap.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/scoreonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/tote.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/utf8statetable.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_uni_prop_80.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_cjk_compatible.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_delta_bi_32.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_distinct_bi_0.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quad0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_16.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_2.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_2.o
npm ERR!   AR(target) Release/obj.target/deps/cld/cld-c.a
npm ERR!   COPY Release/cld-c.a
npm ERR!   CXX(target) Release/obj.target/cld/src/constants.o
npm ERR!   CXX(target) Release/obj.target/cld/src/cld.o
npm ERR! make: Leaving directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.13.2 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.1 found at "/usr/bin/python3"
npm ERR! (node:85531) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/jirka/Programs/Mailspring/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/jirka/Programs/Mailspring/app/node_modules/cld/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/jirka/Programs/Mailspring/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/jirka/.cache/node-gyp/8.5.5/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/jirka/.cache/node-gyp/8.5.5',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/jirka/Programs/Mailspring/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/jirka/.cache/node-gyp/8.5.5/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/jirka/Programs/Mailspring/app/node_modules/cld',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/cld.cc:5:12: error: ‘terminate_handler’ has not been declared in ‘std’
npm ERR!     5 | using std::terminate_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~
npm ERR! ../src/cld.cc:6:12: error: ‘unexpected_handler’ has not been declared in ‘std’
npm ERR!     6 | using std::unexpected_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~~
npm ERR! make: *** [cld.target.mk:113: Release/obj.target/cld/src/cld.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/jirka/Programs/Mailspring/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.16.1-zen1-1-zen
npm ERR! gyp ERR! command "/home/jirka/.nvm/versions/node/v16.13.2/bin/node" "/home/jirka/Programs/Mailspring/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jirka/.npm/_logs/2022-01-20T17_49_03_335Z-debug.log

`------------- stdout ------------

npm ERR! code 1
npm ERR! path /home/jirka/Programs/Mailspring
npm ERR! command failed
npm ERR! command sh -c node scripts/postinstall.js

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jirka/.npm/_logs/2022-01-20T17_49_03_573Z-debug.log

I don’t know what to do at thsi point

@jiriks74 As mentioned, your node version is probably too new for the current master branch of Mailspring. I suggest to use nvm to install node 11 or 12. It should work.

I tried that first, but then I switched to a newer one as mentioned in the link you sent me. I haven’t tried 11 though, so I’ll report on that

I just tried node: v11.15.0 with npm: v6.7.0 and again everything errored out, looks like still the same issue

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

> mailspring-root@0.0.1 postinstall /home/jirka/Programs/Mailspring
> node scripts/postinstall.js


-- Clearing app/node_modules (false !== 8.5.5) --

-- Running npm install --no-audit in ./app with electron config --
npm WARN EBADENGINE Unsupported engine { package: 'cld@2.6.0',
npm WARN EBADENGINE   required: { node: '>=12.0.0' },
npm WARN EBADENGINE   current: { node: '11.15.0', npm: '7.8.0' } }
npm ERR! code 1
npm ERR! path /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil_shared.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_hint_code.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_impl.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/debug.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/fixunicodevalue.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_entities.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_language.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_ulscript.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/getonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/lang_script.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/offsetmap.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/scoreonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/tote.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/utf8statetable.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_uni_prop_80.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_cjk_compatible.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_delta_bi_32.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_distinct_bi_0.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quad0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_16.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_2.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_2.o
npm ERR!   AR(target) Release/obj.target/deps/cld/cld-c.a
npm ERR!   COPY Release/cld-c.a
npm ERR!   CXX(target) Release/obj.target/cld/src/constants.o
npm ERR!   CXX(target) Release/obj.target/cld/src/cld.o
npm ERR! make: Leaving directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR! ../src/cld.cc:5:12: error: ‘terminate_handler’ has not been declared in ‘std’
npm ERR!     5 | using std::terminate_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~
npm ERR! ../src/cld.cc:6:12: error: ‘unexpected_handler’ has not been declared in ‘std’
npm ERR!     6 | using std::unexpected_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~~
npm ERR! make: *** [cld.target.mk:113: Release/obj.target/cld/src/cld.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/jirka/Programs/Mailspring/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12)
npm ERR! gyp ERR! System Linux 5.16.1-zen1-1-zen
npm ERR! gyp ERR! command "/home/jirka/.nvm/versions/node/v11.15.0/bin/node" "/home/jirka/Programs/Mailspring/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! gyp ERR! node -v v11.15.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jirka/.npm/_logs/2022-01-20T22_05_32_076Z-debug.log
safeExec: the command exited with Error: Command failed: npm install --no-audit
npm WARN EBADENGINE Unsupported engine { package: 'cld@2.6.0',
npm WARN EBADENGINE   required: { node: '>=12.0.0' },
npm WARN EBADENGINE   current: { node: '11.15.0', npm: '7.8.0' } }
npm ERR! code 1
npm ERR! path /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil_shared.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_hint_code.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_impl.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/debug.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/fixunicodevalue.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_entities.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_language.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_ulscript.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/getonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/lang_script.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/offsetmap.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/scoreonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/tote.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/utf8statetable.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_uni_prop_80.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_cjk_compatible.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_delta_bi_32.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_distinct_bi_0.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quad0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_16.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_2.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_2.o
npm ERR!   AR(target) Release/obj.target/deps/cld/cld-c.a
npm ERR!   COPY Release/cld-c.a
npm ERR!   CXX(target) Release/obj.target/cld/src/constants.o
npm ERR!   CXX(target) Release/obj.target/cld/src/cld.o
npm ERR! make: Leaving directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR! ../src/cld.cc:5:12: error: ‘terminate_handler’ has not been declared in ‘std’
npm ERR!     5 | using std::terminate_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~
npm ERR! ../src/cld.cc:6:12: error: ‘unexpected_handler’ has not been declared in ‘std’
npm ERR!     6 | using std::unexpected_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~~
npm ERR! make: *** [cld.target.mk:113: Release/obj.target/cld/src/cld.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/jirka/Programs/Mailspring/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12)
npm ERR! gyp ERR! System Linux 5.16.1-zen1-1-zen
npm ERR! gyp ERR! command "/home/jirka/.nvm/versions/node/v11.15.0/bin/node" "/home/jirka/Programs/Mailspring/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! gyp ERR! node -v v11.15.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jirka/.npm/_logs/2022-01-20T22_05_32_076Z-debug.log
1
`------------- stderr ------------
npm WARN EBADENGINE Unsupported engine { package: 'cld@2.6.0',
npm WARN EBADENGINE   required: { node: '>=12.0.0' },
npm WARN EBADENGINE   current: { node: '11.15.0', npm: '7.8.0' } }
npm ERR! code 1
npm ERR! path /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil_shared.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_hint_code.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_impl.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/debug.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/fixunicodevalue.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_entities.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_language.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_ulscript.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/getonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/lang_script.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/offsetmap.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/scoreonescriptspan.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/tote.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/utf8statetable.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_uni_prop_80.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_cjk_compatible.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_delta_bi_32.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_distinct_bi_0.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quad0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctocta0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctoctachrome.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_16.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_2.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_0122.o
npm ERR!   CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_2.o
npm ERR!   AR(target) Release/obj.target/deps/cld/cld-c.a
npm ERR!   COPY Release/cld-c.a
npm ERR!   CXX(target) Release/obj.target/cld/src/constants.o
npm ERR!   CXX(target) Release/obj.target/cld/src/cld.o
npm ERR! make: Leaving directory '/home/jirka/Programs/Mailspring/app/node_modules/cld/build'
npm ERR! ../src/cld.cc:5:12: error: ‘terminate_handler’ has not been declared in ‘std’
npm ERR!     5 | using std::terminate_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~
npm ERR! ../src/cld.cc:6:12: error: ‘unexpected_handler’ has not been declared in ‘std’
npm ERR!     6 | using std::unexpected_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~~
npm ERR! make: *** [cld.target.mk:113: Release/obj.target/cld/src/cld.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/jirka/Programs/Mailspring/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12)
npm ERR! gyp ERR! System Linux 5.16.1-zen1-1-zen
npm ERR! gyp ERR! command "/home/jirka/.nvm/versions/node/v11.15.0/bin/node" "/home/jirka/Programs/Mailspring/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/jirka/Programs/Mailspring/app/node_modules/cld
npm ERR! gyp ERR! node -v v11.15.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jirka/.npm/_logs/2022-01-20T22_05_32_076Z-debug.log

`------------- stdout ------------

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mailspring-root@0.0.1 postinstall: `node scripts/postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mailspring-root@0.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jirka/.npm/_logs/2022-01-20T22_05_32_138Z-debug.log

Hey @jiriks74 - For what it’s worth, I’ve had success building the electron-upgrade branch on Arch Linux using the latest node v14 (v14.19.0). After switching to v14 and doing an npm i, you should be able to run npm start -- --enable-features=UseOzonePlatform --ozone-platform=wayland if you’re attempting to run it in a Wayland environment (e.g. sway).

1 Like