I recently got Visual Studio Code on my Mac and wanted to add TypeScript for Angular. I believe I already installed Node.js or Git in the past. However, when I tried running this command from the TypeScript website in the Mac Terminal to install TypeScript, it didn't work:
npm install -g typescript
Upon pasting the command into the Terminal and hitting enter, I encountered the following error code: (Can someone please explain what the issue is? I'm not very proficient with terminals and would appreciate some beginner-friendly tips. Thanks!!)
MacBook-Pro:~ Max$ npm install -g typescript
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
...
MacBook-Pro:~ Max$ npm install -g typescript
...
[Similar error message repeats]