Meteor - 为什么我的所有包裹都被移除了?

Meteor - for what reason were all my packages removed?

在我的本地机器上,我正在处理一个 Meteor 项目。我离开了终端,当我回到家时,我检查并看到了下面代码中的内容(第一行是昨天的)。我通过复制粘贴解决了这个问题,然后做了一些转换,这样我就可以把所有的包都加回来。只需使用 'meteor add ...'。任何人都知道这是怎么发生的?试想一下,如果您的生产服务器决定删除所有 meteor 包 ;)

=> Client modified -- refreshing (x26)

Changes to your project's package version selections:

accounts-base              removed from your project
accounts-facebook          removed from your project
accounts-oauth             removed from your project
accounts-twitter           removed from your project
accounts-ui-unstyled       removed from your project
application-configuration  removed from your project
autopublish                removed from your project
autoupdate                 removed from your project
base64                     removed from your project
binary-heap                removed from your project
blaze                      removed from your project
blaze-tools                removed from your project
boilerplate-generator      removed from your project
callback-hook              removed from your project
check                      removed from your project
ddp                        removed from your project
deps                       removed from your project
ejson                      removed from your project
facebook                   removed from your project
fastclick                  removed from your project
follower-livedata          removed from your project
fourseven:scss             removed from your project
geojson-utils              removed from your project
html-tools                 removed from your project
htmljs                     removed from your project
http                       removed from your project
id-map                     removed from your project
insecure                   removed from your project
iron:controller            removed from your project
iron:core                  removed from your project
iron:dynamic-template      removed from your project
iron:layout                removed from your project
iron:location              removed from your project
iron:middleware-stack      removed from your project
iron:router                removed from your project
iron:url                   removed from your project
jquery                     removed from your project
json                       removed from your project
launch-screen              removed from your project
livedata                   removed from your project
localstorage               removed from your project
logging                    removed from your project
meteor                     removed from your project
meteor-platform            removed from your project
minifiers                  removed from your project
minimongo                  removed from your project
mobile-status-bar          removed from your project
mongo                      removed from your project
oauth                      removed from your project
oauth1                     removed from your project
oauth2                     removed from your project
observe-sequence           removed from your project
ordered-dict               removed from your project
random                     removed from your project
reactive-dict              removed from your project
reactive-var               removed from your project
reload                     removed from your project
retry                      removed from your project
routepolicy                removed from your project
sacha:spin                 removed from your project
sergeyt:typeahead          removed from your project
service-configuration      removed from your project
session                    removed from your project
spacebars                  removed from your project
spacebars-compiler         removed from your project
templating                 removed from your project
tracker                    removed from your project
twitter                    removed from your project
ui                         removed from your project
underscore                 removed from your project
url                        removed from your project
webapp                     removed from your project
webapp-hashing             removed from your project

W20150301-17:54:20.272(1)? (STDERR)
W20150301-17:54:20.273(1)? (STDERR) /Users/flowen/Documents/_htdocs/dateanomad.net/.meteor/local/build/programs/server/boot.js:246
W20150301-17:54:20.274(1)? (STDERR) }).run();
W20150301-17:54:20.274(1)? (STDERR)    ^
W20150301-17:54:20.275(1)? (STDERR) ReferenceError: Mongo is not defined
W20150301-17:54:20.275(1)? (STDERR)     at app/lib/collections.js:1:51
W20150301-17:54:20.275(1)? (STDERR)     at app/lib/collections.js:4:3
W20150301-17:54:20.275(1)? (STDERR)     at /Users/flowen/Documents/_htdocs/dateanomad.net/.meteor/local/build/programs/server/boot.js:205:10
W20150301-17:54:20.276(1)? (STDERR)     at Array.forEach (native)
W20150301-17:54:20.276(1)? (STDERR)     at Function._.each._.forEach (/Users/flowen/.meteor/packages/meteor-tool/.1.0.41.11tnnrw++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20150301-17:54:20.276(1)? (STDERR)     at /Users/flowen/Documents/_htdocs/project/.meteor/local/build/programs/server/boot.js:116:5
=> Exited with code: 8

如果您的 meteor 应用程序是 运行,则可能会发生确切的情况,然后删除 .meteor 目录,或者更具体地说,删除 .meteor/packages 文件。

您可以通过使用 meteor create 创建一个测试项目来检查这一点,然后通过 meteor run 运行 它并删除 .meteor/packages 文件。

不过,我不太确定是什么原因导致文件被删除。

这不会在生产环境中发生 mode/meteor 部署,因为它不会归档监视。您机器上的某些东西删除了文件。