简体   繁体   English

如何在 windows 上安装没有管理员权限的 gatsby-CLI

[英]How to install gatsby-CLI without admin permissions on windows

I am trying to install gatsby CLI by using below npm我正在尝试使用以下 npm 安装 gatsby CLI

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并坚持以下问题可能是因为我没有管理员访问权限,任何人都知道如何摆脱这个错误或在没有管理员访问权限的情况下全局安装 gatsby 或者如果我没有全局安装那么如何在 CLI 上使用 gatsby 命令

在此处输入图像描述

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.但是,您可以在本地计算机(您具有管理员访问权限)上安装gatsby-cli ,然后gatsby build生成一个public目录。 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 .最后,您可以通过将public目录复制到您没有管理员访问权限的 web 服务器来部署您的网站,例如,使用scp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM