首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么“流星npm安装”不适用于gitpod工作空间?

为什么“流星npm安装”不适用于gitpod工作空间?
EN

Stack Overflow用户
提问于 2020-07-09 14:40:43
回答 1查看 405关注 0票数 1

我是gitpod.io的新手,我试图在gitpod.io上打开一个流星项目,当我输入"meteor npm安装“时,它显示的是"bash: meteor: CommandNotFind”,但是,如果我尝试"npm “,它就会正常工作。

请帮我解决这个问题。

EN

回答 1

Stack Overflow用户

发布于 2020-07-09 15:23:00

原因是meteor没有安装在默认工作区码头图像中。

您可以在工作区中运行curl https://install.meteor.com/ | sh。你会收到这样的信息:

代码语言:javascript
复制
Meteor 1.10.2 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.
This may prompt for your password.
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

Couldn't write the launcher script. Please either:

  (1) Run the following as root:
        cp "/home/gitpod/.meteor/packages/meteor-tool/1.10.2/mt-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor
  (2) Add "$HOME/.meteor" to your path, or
  (3) Rerun this command to try again.

Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.

由于您没有根权限,所以/usr/local/bin/中的脚本不能以这种方式安装。但是,您仍然可以像这样使用流星:

代码语言:javascript
复制
$ ~/.meteor/meteor

另一种方法是添加您自己的Dockerfile,如docs:https://www.gitpod.io/docs/config-docker/中所描述的那样,您可以安装具有根权限的meteor

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62817419

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档