Error during now-cli installation

Nithin21
Tera Expert

Operating System :

Ubuntu

 

Followed the steps in Developer site 

1. Install Node.js v12.x using npm manager

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

2. Validate node js and npm are available.

3. Install Now-Cli . 

npm install --global @servicenow/cli@orlando

I received the below error.

Understand that installation does not have read / write permission to the mentioned folder. 

I am unable to find the mentioned folder in my laptop to provide the permission. 

npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/@servicenow/cli/src/index.js
npm ERR! dest /usr/bin/tectonic
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/@servicenow/cli/src/index.js' -> '/usr/bin/tectonic'
npm ERR!  [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/@servicenow/cli/src/index.js' -> '/usr/bin/tectonic'] {
npm ERR!   cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/@servicenow/cli/src/index.js' -> '/usr/bin/tectonic'] {
npm ERR!     errno: -13,
npm ERR!     code: 'EACCES',
npm ERR!     syscall: 'symlink',
npm ERR!     path: '../lib/node_modules/@servicenow/cli/src/index.js',
npm ERR!     dest: '/usr/bin/tectonic'
npm ERR!   },
npm ERR!   stack: "Error: EACCES: permission denied, symlink '../lib/node_modules/@servicenow/cli/src/index.js' -> '/usr/bin/tectonic'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../lib/node_modules/@servicenow/cli/src/index.js',
npm ERR!   dest: '/usr/bin/tectonic'
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/nithin/.npm/_logs/2020-04-24T16_00_22_226Z-debug.log
1 ACCEPTED SOLUTION

jeff_foltz
Kilo Expert

This error is before now-cli is installed.  Your system may not like installing now-cli globally. 

Take a look at https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally .  

I believe live coding happy hour ran into the same issue https://www.youtube.com/watch?v=57kbG-dRxJ4 

Also, take a look the recap for their videos for some more links and information.  https://developer.servicenow.com/blog.do?p=/post/orlando-components-lchh-recap/

View solution in original post

5 REPLIES 5

Rachel Gomez
Giga Expert

Here are some common problems seen when installing the Azure CLI on Windows. If you experience a problem not covered here, file an issue on GitHub.

Proxy blocks connection
If you can't download the MSI installer because your proxy is blocking the connection, make sure that you have your proxy properly configured. For Windows 10, these settings are managed in the Settings > Network & Internet > Proxy pane. Contact your system administrator for the required settings, or for situations where your machine may be configuration-managed or require advanced setup.

Important

These settings are also required to be able to access Azure services with the CLI, from both PowerShell or the Command Prompt. In PowerShell, you do this with the following command:

PowerShell

Copy
(New-Object System.Net.WebClient).Proxy.Credentials = `
[System.Net.CredentialCache]::DefaultNetworkCredentials

 

Regards,

Rachel Gomez