I am trying to install json-server but failed repeatedly and it makes me hopeless. Now need help to makes the solution. Below the command which I have used on the Ubunto-20.04 Operating System.
- Installed Nodejs version: v14.16.0
- Installed NPM version: 6.14.10
And Although firstly, I used the latest version of nodejs which was 15x but I also faced an error to install json-server and below's command used to install json-server
npm install json-server -gnpm install -g json-servernpm i json-server
I have used all of the above command to install json-server but in every moments I faced error and that's given below,
Here is error
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/imdadul/.npm/_logs/2021-03-18T04_32_41_181Z-debug.log
Note: The error also added in the attached file and Advanced thanks for your helps.
