Updating Corepack in Apple won't yield the proper result - terminal

I am trying to update my system fully (CorePack, npm, Jest...)
Runnign npm list -g yields
/usr/local/lib
├── corepack#0.15.2
├── jest#29.3.1
├── n#9.0.1
└── npm#9.3.1
Today (Jan 19th 2023), CorePack latest version is 0.15.3, to which I was trying to update from 0.15.2.
Runnning npm install -g corepack, the output of my terminal is as it follows:
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/corepack
npm ERR! dest /usr/local/lib/node_modules/.corepack-xqcTrkeV
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/corepack' -> '/usr/local/lib/node_modules/.corepack-xqcTrkeV'
npm ERR! [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/corepack' -> '/usr/local/lib/node_modules/.corepack-xqcTrkeV'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/usr/local/lib/node_modules/corepack',
npm ERR! dest: '/usr/local/lib/node_modules/.corepack-xqcTrkeV'
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! /Users/AGLAYA/.npm/_logs/2023-01-19T14_19_40_038Z-debug-0.log
As far as I know, I should have all possible permissions, as I am the only Administrator User who uses my computer—and never before had any permissions issues.
Obviously, I would've expected CorePack to get updated to 0.15.3.
Also, what is n#9.0.1?

Related

How to install Nodemon via Terminal on Mac

I'm trying to install Nodemon via terminal by typing:
npm install -g nodemon
But my terminal throws the following error:
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/nodemon
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/nodemon'
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! /Users/ayrix/.npm/_logs/2022-12-15T18_50_01_089Z-debug-0.log
Does anyone has an idea how I can change the permisson to install the utility?
Thanks
It didn't take long to figure it out though.
I just had to type the sudo command infront like
sudo npm install -g nodemon
I think it's still worth to keep that post in case that someone else faces the same issue.

How to install node_modules in Laravel Sail using WSL?

When I try to use: sail npm install
I get this error
root#WINDOWS-E22VCBT:~/touchdownclub# sail npm install
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /var/www/html/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/var/www/html/node_modules'
npm ERR! [Error: EACCES: permission denied, mkdir '/var/www/html/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/var/www/html/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/sail/.npm/_logs/2022-08-30T15_18_36_633Z-debug-0.log
root#WINDOWS-E22VCBT:~/touchdownclub#
The root of my working directory is
\\wsl$\Ubuntu\root\touchdownclub
I don't see that there is a path /var/www/html
I tried sail npm install --prefix /
in the touchdownclub directory
Is my install completely wrong or is there a way to get node_modules to install

Angular installation failure in Ubuntu 16.04 (Xenial Xerus)

Angular CLI always shows an error while running the installation command and also the ng shows no such command found. How do I get rid of this problem?
shivashish-Inspiron-3521% cd Angular-project
shivashish-Inspiron-3521% ls
shivashish-Inspiron-3521% sudo npm install -g angular/cli
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git#github.com/angular/cli.git
npm ERR!
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /home/shivashish/.npm/_logs/2018-11-25T10_01_17_050Z-debug.log
shivashish-Inspiron-3521% ls
shivashish-Inspiron-3521% ng new app
zsh: command not found: ng
shivashish-Inspiron-3521% node -v
v8.13.0
I run again and now I get this:
shivashish-Inspiron-3521% npm install -g #angular/cli
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
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 (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /home/shivashish/.npm/_logs/2018-11-25T13_53_57_814Z-debug.log
This is because it should be #angular/cli instead of angular/cli. The correct command is:
sudo npm install -g #angular/cli
according to Step 1: Install the Angular CLI
PS: please don't forget to use sudo when installing globally (-g parameter) on linux

Can't install TypeScript on MacOS - Terminal Error

I have Visual Studio Code on my Mac and want to install TypeScript for Angular. I already previously installed Node.js or Git I think. This command from the TypeScript website should install TypeScript if it's run in the Mac Terminal, but it doesn't:
npm install -g typescript
If I paste it in the Terminal and press enter, this Error-code appears in the Terminal: (What is the problem? I really don't get it and have no clue about the terminal, I'm not a computer pro. Would be a big help if you have tips in easy words for beginners. 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'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
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! 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 (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Max/.npm/_logs/2018-06-30T14_50_35_633Z-debug.log
MacBook-Pro:~ Max$ clear
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'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
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! 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 (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Max/.npm/_logs/2018-06-30T14_58_29_869Z-debug.log
MacBook-Pro:~ Max$ clear
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'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
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! 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 (though this is not recommended).
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
means you need permissions to download to that location, the reason it requires root privileges is likely because you installed nodejs/npm with root privileges.
sudo npm install -g typescript
then type in your password

ExpressJS installing errors in OS X

I've been working on this for a while and it's the simplest thing....I NEED to simply install express so I can move on and actually work. No matter what I do I get this same error and Express won't install:
~ npm install -g express
npm WARN checkPermissions Missing write access to /Users/revjtanton/.nvm/versions/node/v0.12.2/lib/node_modules/express
/Users/revjtanton/.nvm/versions/node/v0.12.2/lib
└── express#4.14.0
npm ERR! Darwin 15.6.0
npm ERR! argv "node" "/Users/revjtanton/.nvm/versions/node/v0.12.2/bin/npm" "install" "-g" "express"
npm ERR! node v0.12.2
npm ERR! npm v3.9.3
npm ERR! path /Users/revjtanton/.nvm/versions/node/v0.12.2/lib/node_modules/express
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, access '/Users/revjtanton/.nvm/versions/node/v0.12.2/lib/node_modules/express'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, access '/Users/revjtanton/.nvm/versions/node/v0.12.2/lib/node_modules/express']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/revjtanton/.nvm/versions/node/v0.12.2/lib/node_modules/express' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/revjtanton/npm-debug.log
I've managed permissions, cleaned caches, tried installing with sudo (which doesn't produce an error...but I'm still not able to use express).
Execute the command with sudo:
sudo npm install -g express

Resources