如何完全卸载然后重新安装Meteor.js?
我的应用完全出于任何原因开始崩溃.我回滚到一个我知道可以使用的版本,但是仍然崩溃.我从github克隆了一个我绝对知道可以正常使用的版本,因为我已经工作了一个星期.它不会开始.一切都是未定义的"-流星,UI,路由器,模板等.我没有时间这样做.如何完全卸载Meteor并从头开始重新安装?
My app started crashing for absolutely no reason. I rolled back to a version I knew worked, but it is still crashing. I cloned a version from github that I absolutely know was working because I've been working on it for a week. It won't start. Everything is 'undefined' -- Meteor, UI, Router, Template, etc. I don't have time for this. How can I completely uninstall Meteor and reinstall it from scratch?
加分:为什么会发生这种情况,如何防止再次发生?
For bonus points: why did this happen and how can I prevent it from happening again?
让我们从删除内容开始,然后我们将继续进行重新安装.
Let’s start with the deletions, then we’ll move on to the reinstallations.
-
如果您曾经安装过Meteorite,请卸载并删除它:
If you ever installed Meteorite, uninstall and delete it:
sudo mrt uninstall
sudo mrt uninstall --system
rm -rf ~/.meteorite
然后删除流星:
Then delete Meteor:
sudo rm /usr/local/bin/meteor
rm -rf ~/.meteor
现在从头开始:
-
必要时进行修复:
Repair permissions if necessary:
sudo chown -R $(whoami) ~/.npm
重新安装流星:
Reinstall Meteor:
curl https://install.meteor.com/ | sh
下一步,检查您的项目是否具有所有正确的程序包:
Next check that your project has all its proper packages:
cd /path/to/your/project
meteor update
如果您的项目仍然无法编译,则可以将其重置(警告:删除数据库):
If your project still won’t compile, you can reset it (warning: deletes database):
cd /path/to/your/project
meteor reset
还是没有运气吗?重新创建Meteor项目(警告:删除数据库和该项目对您已安装的软件包的存储):
Still no luck? Recreate the Meteor project (warning: deletes database and the project’s memory of what packages you’ve installed):
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*
以重新安装您正在使用的每个软件包)
(and run meteor add *packagename*
over and over to reinstall each package you were using)