npm install -g not working on windows even with run as administrator

I am trying to run npm i -g @nestjs/cli and corepack enable on a Windows machine.

I ran cmd as Administrator, as the image below indicates. Powershell as admin did not work too. I tried cleaning npm cache, it did not work.

Have anyone had this problem even with administrator privileges on Windows? The files aren`t being used by any other processes, I disabled my antivirus. Nothing worked.

C:WindowsSystem32>npm i -g @nestjs/cli
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\Program Files\nodejs\node_modules\@nestjs\cli',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:Program Filesnodejsnode_modules@nestjsclinode_modulestypescriptlib'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\Program Files\nodejs\node_modules\@nestjs\cli\node_modules\typescript\lib'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\Program Files\nodejs\node_modules\@nestjs\cli',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:Program Filesnodejsnode_modules@nestjsclinode_modulesrxjsdistesm5internal'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\Program Files\nodejs\node_modules\@nestjs\cli\node_modules\rxjs\dist\esm5\internal'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:Program Filesnodejsnest.ps1
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'C:Program Filesnodejsnest.ps1'
npm ERR!     at async open (node:internal/fs/promises:638:25)
npm ERR!     at async writeFile (node:internal/fs/promises:1221:14)
npm ERR!     at async Promise.all (index 0)
npm ERR!     at async Promise.all (index 0)
npm ERR!     at async Promise.all (index 0)
npm ERR!     at async #createBinLinks (C:Program Filesnodejsnode_modulesnpmnode_modules@npmcliarboristlibarboristrebuild.js:398:5)
npm ERR!     at async Promise.allSettled (index 0)
npm ERR!     at async #linkAllBins (C:Program Filesnodejsnode_modulesnpmnode_modules@npmcliarboristlibarboristrebuild.js:379:5)
npm ERR!     at async #build (C:Program Filesnodejsnode_modulesnpmnode_modules@npmcliarboristlibarboristrebuild.js:163:7)
npm ERR!     at async Arborist.rebuild (C:Program Filesnodejsnode_modulesnpmnode_modules@npmcliarboristlibarboristrebuild.js:65:5)
npm ERR!  Error: EPERM: operation not permitted, open 'C:Program Filesnodejsnest.ps1'
npm ERR!     at async open (node:internal/fs/promises:638:25)
npm ERR!     at async writeFile (node:internal/fs/promises:1221:14)
npm ERR!     at async Promise.all (index 0)
npm ERR!     at async Promise.all (index 0)
npm ERR!     at async Promise.all (index 0)
npm ERR!     at async #createBinLinks (C:Program Filesnodejsnode_modulesnpmnode_modules@npmcliarboristlibarboristrebuild.js:398:5)
npm ERR!     at async Promise.allSettled (index 0)
npm ERR!     at async #linkAllBins (C:Program Filesnodejsnode_modulesnpmnode_modules@npmcliarboristlibarboristrebuild.js:379:5)
npm ERR!     at async #build (C:Program Filesnodejsnode_modulesnpmnode_modules@npmcliarboristlibarboristrebuild.js:163:7)
npm ERR!     at async Arborist.rebuild (C:Program Filesnodejsnode_modulesnpmnode_modules@npmcliarboristlibarboristrebuild.js:65:5) {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'C:\Program Files\nodejs\nest.ps1'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
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.

I tried:

  1. Run as Administrator (both cmd and powershell)
  2. Disable Antivirus
  3. Restart computer
  4. Reinstall NODE.js

All expecting that it would run the command fine. Nothing worked

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật