Unable to install n8n using npm. facing the below error.
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
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
Tried running as Administration using sudo and still facing the same error.
Is sadly not an n8n related issue. Is more specific to your system. So can sadly not be of much help here. You will have probably much more luck if you google the error message "Missing write access to /usr/local/lib/node_modules". You will then find different possible solutions like:
Where they simply suggest to change the owner.
Alternatively you can also install n8n in a folder instead of globally. So something like:
# Create a folder in the home directory
mkdir ~/n8n
# Change to new folder
cd ~/n8n
# Install n8n
npm install n8n
on ubuntu, many parts of the install script will try to access dirs that are not accessible by the user.
bad install scripts. it is not ubuntu fault…
install it locally is the better option, as i am not sure it will be smart running npm -g as SUDO.
but now the question is - how we cleann all the half-install garbage that stopped in the middle… ?
I’ve also had several issues with npm before. If you’re installing n8n without Docker, my script can help you set it up automatically. Just run the following commands: