Member-only story
Missing Write Access to /user/local/lib/node_modules
Jun 7, 2024
Problem:
You are running in your command prompt and you face this error.
Missing Write Access to /user/local/lib/node_modules
Solution:
Step 1: Add following lines to ~/.bashrc after installing npm:
npm set prefix ~/.npm
PATH="$HOME/.npm/bin:$PATH"
PATH="./node_modules/.bin:$PATH"
Step 2: Execute following line after changes:
source ~/.bashrc
Step 3: Run the original command you had issues with. It should work now!