stack Error: EACCES: permission denied sqlite3

Installing n8n

npm install n8n -g
npx n8n

What is n8n ?

n8n (pronounced n-eight-n) helps you to interconnect every app with an API in the world with each other to share and manipulate its data without a single line of code. It is an easy to use, user-friendly and highly customizable service, which uses an intuitive user interface for you to design your unique workflows very fast. Hosted on your server and not based in the cloud, it keeps your sensible data very secure in your own trusted database.

Error Log during installing

npm WARN deprecated [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
/root/.nvm/versions/node/v14.15.1/bin/n8n -> /root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/bin/n8n

> [email protected] install /root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3/lib/binding'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.15.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3/.node-gyp'
gyp ERR! System Linux 4.9.87-xxxx-std-ipv6-64
gyp ERR! command "/root/.nvm/versions/node/v14.15.1/bin/node" "/root/.nvm/versions/node/v14.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3
gyp ERR! node -v v14.15.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/root/.nvm/versions/node/v14.15.1/bin/node /root/.nvm/versions/node/v14.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 4.9.87-xxxx-std-ipv6-64
node-pre-gyp ERR! command "/root/.nvm/versions/node/v14.15.1/bin/node" "/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3
node-pre-gyp ERR! node -v v14.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/root/.nvm/versions/node/v14.15.1/bin/node /root/.nvm/versions/node/v14.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/root/.nvm/versions/node/v14.15.1/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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!     /root/.npm/_logs/2020-11-23T11_14_26_784Z-debug.log

Solution

# npm install n8n -g --unsafe-perm

Tags:

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.