# Build Errors on Manjaro Linux

**URL:** https://discourse.joplinapp.org/t/build-errors-on-manjaro-linux/21508
**Category:** Development
**Created:** [4 November 2021 20:49 UTC](https://discourse.joplinapp.org/t/build-errors-on-manjaro-linux/21508 "2021-11-04T20:49:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![vafflez](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/vafflez/32/20656_2.png) [@vafflez](https://discourse.joplinapp.org/u/vafflez)
#### Post date: [4 November 2021 20:49 UTC](https://discourse.joplinapp.org/t/build-errors-on-manjaro-linux/21508/1 "2021-11-04T20:49:11Z")

</div>

os: Manjaro Linux  
node version: v16.11.0  
npm version: 8.0.0

Hi! When trying to build Joplin I get the following error. Any help would be greatly appreciated.

```auto
➜ joplin git:(dev) npm install
npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated highlight.js@10.3.2: Potential vulnerability. Please upgrade to @latest

> postinstall
> npm run bootstrap --no-ci && npm run build

> bootstrap
> lerna bootstrap --force-local --no-ci

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 16 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in '@joplin/server'
lerna ERR! npm install stderr:
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path /home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (7)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.11.0
npm ERR! node-pre-gyp info using node@16.11.0 | linux | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download 
npm ERR! node-pre-gyp info check checked for "/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v93-linux-x64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.1.0 and node@16.11.0 (node-v93 ABI, glibc) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v93-linux-x64.tar.gz 
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.11.0 | linux | x64
npm ERR! gyp info ok 
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.11.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.9.7 found at "/usr/bin/python3"
npm ERR! gyp ERR! UNCAUGHT EXCEPTION 
npm ERR! gyp ERR! stack Error: Cannot find module 'request'
npm ERR! gyp ERR! stack Require stack:
npm ERR! gyp ERR! stack - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/install.js
npm ERR! gyp ERR! stack - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
npm ERR! gyp ERR! stack - /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
npm ERR! gyp ERR! stack at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! gyp ERR! stack at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! gyp ERR! stack at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! gyp ERR! stack at require (node:internal/modules/cjs/helpers:102:18)
npm ERR! gyp ERR! stack at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:10:17)
npm ERR! gyp ERR! stack at Module._compile (node:internal/modules/cjs/loader:1101:14)
npm ERR! gyp ERR! stack at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR! gyp ERR! stack at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! gyp ERR! stack at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! gyp ERR! stack at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! gyp ERR! System Linux 5.10.70-1-MANJARO
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3
npm ERR! gyp ERR! node -v v16.11.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (7)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/jefferyl/Projects/joplin/packages/server/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.10.70-1-MANJARO
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/jefferyl/Projects/joplin/packages/server/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v16.11.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T20_43_29_355Z-debug.log

lerna ERR! npm install exited 1 in '@joplin/server'
lerna WARN complete Waiting for 7 child processes to exit. CTRL-C to exit immediately.
npm ERR! code 1
npm ERR! path /home/jefferyl/Projects/joplin
npm ERR! command failed
npm ERR! command sh -c npm run bootstrap --no-ci && npm run build

npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T20_43_29_533Z-debug.log

```

---

<div class="post-metadata">

### Author: ![roman\_r\_m](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/roman_r_m/32/3297_2.png) [@roman\_r\_m](https://discourse.joplinapp.org/u/roman_r_m)
#### Post date: [4 November 2021 21:06 UTC](https://discourse.joplinapp.org/t/build-errors-on-manjaro-linux/21508/2 "2021-11-04T21:06:35Z")

</div>

Try upgrading node-gyp. I'm using 8.2.0 and it works for me. I'm also on Manjaro.

---

<div class="post-metadata">

### Author: ![vafflez](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/vafflez/32/20656_2.png) [@vafflez](https://discourse.joplinapp.org/u/vafflez)
#### Post date: [4 November 2021 21:48 UTC](https://discourse.joplinapp.org/t/build-errors-on-manjaro-linux/21508/3 "2021-11-04T21:48:04Z")

</div>

Nice, thanks @roman_r_m. That seems to have resolved the node-gyp errors. However, now I'm getting an error that wants me to rename files. I tried moving them as requested, but it still results in a similar error, but with a different file.

```auto
➜ joplin git:(dev) ✗ npm install

> postinstall
> npm run bootstrap --no-ci && npm run build

> bootstrap
> lerna bootstrap --force-local --no-ci

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 16 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 217 in '@joplin/lib'
lerna ERR! npm install stderr:
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/jefferyl/Projects/joplin/packages/lib/node_modules/acorn-globals
npm ERR! dest /home/jefferyl/Projects/joplin/packages/lib/node_modules/.acorn-globals-RnxtdHqX
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/jefferyl/Projects/joplin/packages/lib/node_modules/acorn-globals' -> '/home/jefferyl/Projects/joplin/packages/lib/node_modules/.acorn-globals-RnxtdHqX'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T21_24_55_923Z-debug.log

lerna ERR! npm install exited 217 in '@joplin/lib'
lerna WARN complete Waiting for 5 child processes to exit. CTRL-C to exit immediately.
npm ERR! code 217
npm ERR! path /home/jefferyl/Projects/joplin
npm ERR! command failed
npm ERR! command sh -c npm run bootstrap --no-ci && npm run build

npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T21_24_56_010Z-debug.log
➜ joplin git:(dev) ✗ npm install

> postinstall
> npm run bootstrap --no-ci && npm run build

> bootstrap
> lerna bootstrap --force-local --no-ci

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 16 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 217 in '@joplin/lib'
lerna ERR! npm install stderr:
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/jefferyl/Projects/joplin/packages/lib/node_modules/acorn-globals
npm ERR! dest /home/jefferyl/Projects/joplin/packages/lib/node_modules/.acorn-globals-RnxtdHqX
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/jefferyl/Projects/joplin/packages/lib/node_modules/acorn-globals' -> '/home/jefferyl/Projects/joplin/packages/lib/node_modules/.acorn-globals-RnxtdHqX'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T21_40_41_255Z-debug.log

lerna ERR! npm install exited 217 in '@joplin/lib'
lerna WARN complete Waiting for 5 child processes to exit. CTRL-C to exit immediately.
npm ERR! code 217
npm ERR! path /home/jefferyl/Projects/joplin
npm ERR! command failed
npm ERR! command sh -c npm run bootstrap --no-ci && npm run build

npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T21_40_41_315Z-debug.log

```

Some of the other requests it made of me:

```auto
'/home/jefferyl/Projects/joplin/packages/lib/node_modules/ansi-escape-sequences' -> '/home/jefferyl/Projects/joplin/packages/lib/node_modules/.ansi-escape-sequences-IlRVx4p2'
'/home/jefferyl/Projects/joplin/packages/lib/node_modules/are-we-there-yet' -> '/home/jefferyl/Projects/joplin/packages/lib/node_modules/.are-we-there-yet-uojDDi4l'

```

---

<div class="post-metadata">

### Author: ![roman\_r\_m](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/roman_r_m/32/3297_2.png) [@roman\_r\_m](https://discourse.joplinapp.org/u/roman_r_m)
#### Post date: [4 November 2021 21:53 UTC](https://discourse.joplinapp.org/t/build-errors-on-manjaro-linux/21508/4 "2021-11-04T21:53:15Z")

</div>

Try running `npm run clean` first

---

<div class="post-metadata">

### Author: ![vafflez](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/vafflez/32/20656_2.png) [@vafflez](https://discourse.joplinapp.org/u/vafflez)
#### Post date: [4 November 2021 22:18 UTC](https://discourse.joplinapp.org/t/build-errors-on-manjaro-linux/21508/5 "2021-11-04T22:18:15Z")

</div>

`npm run clean` fixes the moving files error.

After that, I tried `npm update -g` for the node-gyp issue since it reappeared.  
Then I ran `npm run clean` again because the moving files error showed up again.  
Then, I ran `rm -rf node_modules && npm install` because I got the error mentioned in this [github issue](https://github.com/electron-userland/electron-prebuilt/issues/166)

And finally, I was able successfully build Joplin! Thanks @roman_r_m 😃
