我的应用程序开始崩溃,绝对没有理由。我回滚到我认识的版本,但它仍然崩溃。我从github克隆了一个我绝对知道正在工作的版本,因为我已经工作了一个星期。它不会开始。一切都是'未定义的' - 流星,用户界面,路由器,模板等。我没时间做这件事。如何从头开始完全卸载Meteor并重新安装?
奖励积分:为什么会发生这种情况?如何防止它再次发生?
答案 0 :(得分:60)
让我们从删除开始,然后我们将继续重新安装。
如果您曾安装过Meteorite,请将其卸载并删除:
sudo mrt uninstall
sudo mrt uninstall --system
rm -rf ~/.meteorite
然后删除Meteor:
sudo rm /usr/local/bin/meteor
rm -rf ~/.meteor
现在从头开始:
必要时修复权限:
sudo chown -R $(whoami) ~/.npm
重新安装Meteor:
curl https://install.meteor.com/ | sh
接下来检查您的项目是否包含所有正确的包:
cd /path/to/your/project
meteor update
如果你的项目仍然无法编译,你可以重置它(警告:删除数据库):
cd /path/to/your/project
meteor reset
还没有运气?重新创建Meteor项目(警告:删除数据库和项目内存中已安装的软件包):
cd /path/to/your/project
rm -rf ./.meteor
cd ..
meteor create project-new
rm ./project-new/project-new.*
mv ./project/* ./project-new/
cd ./project-new
(反复运行meteor add *packagename*
重新安装您正在使用的每个包)
答案 1 :(得分:11)
我认为最简单的是
curl https://install.meteor.com/ | sh
答案 2 :(得分:4)
如果您在Windows操作系统上搜索2017/2018的答案:
choco uninstall meteor
然后
choco install meteor
答案 3 :(得分:3)
我尝试了所有这一切,但都没有奏效。
然后我在命令行中运行了meteor --verbose
,似乎已经解决了问题!快速meteor reset
现在一切正常!
答案 4 :(得分:2)
这里还有别的东西,我读了一个档案, 位于/ usr / local / bin / named meteor的顶部评论中写道:
#!/bin/bash
# This is the script that we install somewhere in your $PATH (as "meteor")
# when you run
# $ curl https://install.meteor.com/ | sh
# It's the only file that we install globally on your system; each user of
# Meteor gets their own personal package and tools repository, called the
# warehouse (or, for 0.9.0 and newer, the "tropohouse"), in ~/.meteor/. This
# means that a user can share packages among multiple apps and automatically
# update to new releases without having to have permissions to write them to
# anywhere global.
#
# All this script does is exec ~/.meteor/meteor. But what if you don't have it
# yet? In that case, it downloads a "bootstrap tarball", which contains the
# latest version of the Meteor tools, and plops it down at ~/.meteor. In fact,
# once you've run this once, you don't even really need this script: you can put
# ~/.meteor/ into your PATH, or a symlink to ~/.meteor/meteor into some other
# PATH directory. No special permissions needed!
#
# To uninstall Meteor from your system, just delete this shell script, and
# delete your warehouse (~/.meteor/).
这是卸载流星的行:
# To uninstall Meteor from your system, just delete this shell script, and
# delete your warehouse (~/.meteor/).
瞧!仓库在哪里!有些人可能认为这个仓库是项目中的.meteor文件夹,但事实并非如此! 它下面2-3行写着:
METEOR_WAREHOUSE_DIR="${METEOR_WAREHOUSE_DIR:-$HOME/.meteor}"
仓库所在的地方!
重新设置流星项目由" meteor reset
"只会重置您的项目包。
P.S。这是针对meteor v1 +
答案 5 :(得分:0)
卸载适用于 Linux和OS X用户的流星
打开终端并运行以下命令-
1. sudo rm /usr/local/bin/meteor
2. rm -rf ~/.meteor
安装流星
打开终端并运行以下命令-
1. curl https://install.meteor.com/ | sh
答案 6 :(得分:0)
TL;博士
rm -rf "$HOME/.meteor"
rc=$(which meteor); rm $rc
说明:
当您查看 https://install.meteor.com/ 时,您可以看到以下代码:
# If you already have a tropohouse/warehouse, we do a clean install here:
if [ -e "$HOME/.meteor" ]; then
echo "Removing your existing Meteor installation."
rm -rf "$HOME/.meteor"
fi
但不幸的是,这并没有删除 meteor 脚本,因此需要手动删除它。