I encountered the following error when running npm install -g n8n
:
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated reflect-metadata@0.2.1: This version has a critical bug in fallback handling. Please upgrade to reflect-metadata@0.2.2 or newer.
npm WARN deprecated @azure/msal-node@1.18.4: A newer major version of this library is available. Please upgrade to the latest available version.
npm WARN deprecated json-schema-ref-parser@9.0.9: Please switch to @apidevtools/json-schema-ref-parser
npm WARN deprecated infisical-node@1.3.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated dommatrix@1.0.3: dommatrix is no longer maintained. Please use @thednp/dommatrix.
npm ERR! code 1
npm ERR! path /usr/home/USER/.npm-global/lib/node_modules/n8n/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c prebuild-install -r napi || node-gyp rebuild
npm ERR! gmake: Entering directory '/usr/home/USER/.npm-global/lib/node_modules/n8n/node_modules/sqlite3/build'
npm ERR! CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
npm ERR! gmake: Leaving directory '/usr/home/USER/.npm-global/lib/node_modules/n8n/node_modules/sqlite3/build'
npm ERR! prebuild-install warn install No prebuilt binaries found (target=6 runtime=napi arch=x64 libc= platform=freebsd)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@18.19.1 | freebsd | x64
npm ERR! gyp info find Python using Python version 3.10.11 found at "/usr/local/bin/python3"
npm ERR! gyp info spawn /usr/local/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/home/USER/.npm-global/lib/node_modules/n8n/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 '/usr/home/USER/.npm-global/lib/node_modules/n8n/node_modules/sqlite3/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/home/USER/.npm-global/lib/node_modules/n8n/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/USER/.cache/node-gyp/18.19.1/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/USER/.cache/node-gyp/18.19.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/home/USER/.npm-global/lib/node_modules/n8n/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/USER/.cache/node-gyp/18.19.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/usr/home/USER/.npm-global/lib/node_modules/n8n/node_modules/sqlite3',
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 gmake
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! /bin/sh: Cannot fork: Resource temporarily unavailable
npm ERR! gmake: *** [../node-addon-api/nothing.target.mk:105: Release/obj.target/nothing/../node-addon-api/nothing.o] Error 2
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `gmake` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/home/USER/.npm-global/lib/node_modules/n8n/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12)
npm ERR! gyp ERR! System FreeBSD 13.2-RELEASE-p10
npm ERR! gyp ERR! command "/usr/local/devil/node18/bin/node" "/usr/home/USER/.npm-global/lib/node_modules/n8n/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /usr/home/USER/.npm-global/lib/node_modules/n8n/node_modules/sqlite3
npm ERR! gyp ERR! node -v v18.19.1
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok