How to install gatsby-CLI without admin permissions on windows

Viewed 309

I am trying to install gatsby CLI by using below npm

npm install --global gatsby-cli

and stuck with the below issue may be because I don't have admin access, anyone any idea how to get rid of this error or install gatsby globally without admin access or if I dont install globally then how to use gatsby command on CLI

enter image description here

1 Answers

You need admin access for installing global packages. However, you can install gatsby-cli on your local machine (where you have admin access), then gatsby build to generate a public directory. Finally, you can deploy your website by copying the public directory to the web server that you don't have admin access to it, for example, by using scp.

Related