When you install npm packages globally using theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/KarChunT/karchunt.com/llms.txt
Use this file to discover all available pages before exploring further.
-g flag, you might encounter this error:
EACCES errors indicate permission denied issues.Method 1: Change npm’s default global directory (Recommended)
Configure npm to use a directory in your home folder where you have write permissions.Method 2: Use a Node Version Manager
Tools like nvm (Node Version Manager) install Node.js and npm directly in your home directory, bypassing the/usr/lib permission issues automatically.
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Method 3: Change global directory ownership
Change the ownership of the existingnode_modules folder to your current user.