Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install the npm #838

Open
rishabh2095s opened this issue Oct 18, 2024 · 1 comment
Open

Unable to install the npm #838

rishabh2095s opened this issue Oct 18, 2024 · 1 comment

Comments

@rishabh2095s
Copy link

While installing the npm i am getting this error. I deleted the whole npm directories but still not able to install. When I use the commands given on salesforce website, hardis says that cli is not installed properly.

npm error code EACCES
npm error syscall rename
npm error path /usr/local/lib/node_modules/@salesforce/cli
npm error dest /usr/local/lib/node_modules/@salesforce/.cli-w0hFn0bY
npm error errno -13
npm error Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@salesforce/cli' -> '/usr/local/lib/node_modules/@salesforce/.cli-w0hFn0bY'
npm error     at async Object.rename (node:internal/fs/promises:782:10)
npm error     at async moveFile (/usr/local/lib/node_modules/npm/node_modules/@npmcli/fs/lib/move-file.js:30:5)
npm error     at async Promise.allSettled (index 0)
npm error     at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
npm error     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5)
npm error     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:150:5)
npm error     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:207:9)
npm error     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:74:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'rename',
npm error   path: '/usr/local/lib/node_modules/@salesforce/cli',
npm error   dest: '/usr/local/lib/node_modules/@salesforce/.cli-w0hFn0bY'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm notice
npm notice New minor version of npm available! 10.8.2 -> 10.9.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
npm notice To update run: npm install -g [email protected]
npm notice
npm error A complete log of this run can be found in: /Users/Rishabh_Sharma/.npm/_logs/2024-10-18T07_33_03_839Z-debug-0.log
Rishabh_Sharma@EPPLKRAW0257 extreme % npm install @salesforce/[email protected] -g
npm error code EACCES
npm error syscall rename
npm error path /usr/local/lib/node_modules/@salesforce/cli
npm error dest /usr/local/lib/node_modules/@salesforce/.cli-w0hFn0bY
npm error errno -13
npm error Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@salesforce/cli' -> '/usr/local/lib/node_modules/@salesforce/.cli-w0hFn0bY'
npm error     at async Object.rename (node:internal/fs/promises:782:10)
npm error     at async moveFile (/usr/local/lib/node_modules/npm/node_modules/@npmcli/fs/lib/move-file.js:30:5)
npm error     at async Promise.allSettled (index 0)
npm error     at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
npm error     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5)
npm error     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:150:5)
npm error     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:207:9)
npm error     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:74:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'rename',
npm error   path: '/usr/local/lib/node_modules/@salesforce/cli',
npm error   dest: '/usr/local/lib/node_modules/@salesforce/.cli-w0hFn0bY'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error A complete log of this run can be found in: /Users/Rishabh_Sharma/.npm/_logs/2024-10-18T07_33_47_096Z-debug-0.log
Rishabh_Sharma@EPPLKRAW0257 extreme % npm install -g [email protected]
npm error code EACCES
npm error syscall rename
npm error path /usr/local/lib/node_modules/npm
npm error dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm error errno -13
npm error Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm error     at async Object.rename (node:internal/fs/promises:782:10)
npm error     at async moveFile (/usr/local/lib/node_modules/npm/node_modules/@npmcli/fs/lib/move-file.js:30:5)
npm error     at async Promise.allSettled (index 0)
npm error     at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
npm error     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5)
npm error     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:150:5)
npm error     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:207:9)
npm error     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:74:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'rename',
npm error   path: '/usr/local/lib/node_modules/npm',
npm error   dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error A complete log of this run can be found in: /Users/Rishabh_Sharma/.npm/_logs/2024-10-18T07_34_01_061Z-debug-0.log
@nvuillam
Copy link
Member

Are you on a company computer, with many restrictions ?

If you are on linux, please can you try sudo npm i @salesforce/cli -g ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants