javascript - 为什么“meteor npm install”不能在 gitpod 工作区上运行?
问题描述
我是 gitpod.io 的新手,我正在尝试在 gitpod.io 上打开一个流星项目,当我输入“ meteor npm install ”时,它显示“ bash: meteor: command not found ”,但是,如果我尝试“ npm install ” “它工作正常。
请帮我解决这个问题。
解决方案
原因是默认工作区meteor
中没有安装Docker 映像。
您可以curl https://install.meteor.com/ | sh
在工作区中运行。你会收到这样的消息:
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.
由于您没有root权限,/usr/local/bin/
因此无法通过这种方式安装脚本。但是,您仍然可以像这样使用流星:
$ ~/.meteor/meteor
另一种方法是按照文档中的说明添加您自己的 Dockerfile:https ://www.gitpod.io/docs/config-docker/
这样,您可以meteor
使用 root 权限进行安装。
推荐阅读
- sql - 如何在 Spring bean 中执行 PL/pgSQL 脚本?
- apache-spark - Spark 应用程序名称约定
- python - 在 python 中安装一些库时遇到问题(oauth2client 和 gspread)
- bash - 运行 Spawn/Expect 加入 Active Directory
- angular - 角度形式的业力单元测试给出错误“”
- c# - 将安全数组中的 PIC N(n) 传递给 COM 对象
- spring-mvc - 在 js 文件或视图文件或 css 文件中所做的更改不会反映给用户
- javascript - 为什么navigation() 在一个客户站点上失败,而它在所有其他站点上都有效?
- vba - 是否可以签署包含时间戳的 Excel VBA 项目?
- if-statement - 带有 OR 逻辑错误的 Google Sheets IF 语句?