Meteor.js:lib文件夹没有先加载

meteor.js中应该首先加载[root] / lib /文件夹,但在我的本地机器上显然不起作用:

http://docs.meteor.com/#structuringyourapp

After sorting as described above, all files under directories named lib are moved before everything else (preserving their order). 

和我的加载顺序:

  <script type="text/javascript" src="/packages/underscore.js?0a80a8623e1b40b5df5a05582f288ddd586eaa18"></script> <script type="text/javascript" src="/packages/meteor.js?148e9381d225ecad703f4b858769b636ff7a2537"></script> <script type="text/javascript" src="/packages/json.js?e22856eae714c681199eabc5c0710b904b125554"></script> <script type="text/javascript" src="/packages/ejson.js?dcf7f22218141278194ba57f79fa891d3f0b53b1"></script> <script type="text/javascript" src="/packages/logging.js?0de00019cf57ae305903f15baf5dc8e10f973ded"></script> <script type="text/javascript" src="/packages/reload.js?ad0e94b5b63bbe79ab30e9dad4e6eb91694f5875"></script> <script type="text/javascript" src="/packages/deps.js?91f1235baecd83915f7d3a7328526dbba41482be"></script> <script type="text/javascript" src="/packages/random.js?fe7b46080c91ce482acf6fc326afbc5b176f0502"></script> <script type="text/javascript" src="/packages/retry.js?1f1dd2c35d300110fdaba51ce4473583bc3bf031"></script> <script type="text/javascript" src="/packages/check.js?a54cf3c7b3abe9208d064621eb80a3ecaf2f4add"></script> <script type="text/javascript" src="/packages/id-map.js?9ea6eaae8d74693ce2505a858d9a5e60cf191298"></script> <script type="text/javascript" src="/packages/ordered-dict.js?bf8af2f26c8d96bf8b2e6b407d3ed69f23c2cd37"></script> <script type="text/javascript" src="/packages/geojson-utils.js?81b79d5cf96d00b4b7a28987debcffb665c17526"></script> <script type="text/javascript" src="/packages/minimongo.js?4ee0ab879b747ffce53b84d2eb80d456d2dcca6d"></script> <script type="text/javascript" src="/packages/livedata.js?502d55e7a7449f770e46330161cb7bd525c4417a"></script> <script type="text/javascript" src="/packages/follower-livedata.js?39b05f02878030ae806a16a173661b7df1e92eb6"></script> <script type="text/javascript" src="/packages/application-configuration.js?fa92020e10c808f1287070d009f69a4054676e5a"></script> <script type="text/javascript" src="/packages/insecure.js?3dc9d4a2dad55999b5b15a447d57f3d5fb66b290"></script> <script type="text/javascript" src="/packages/mongo-livedata.js?26f4a1853dbf09c49d7cc49710b6fa14f83b138b"></script> <script type="text/javascript" src="/packages/autoupdate.js?85a69577c7e94226061fb2c886f23080a9163712"></script> <script type="text/javascript" src="/packages/standard-app-packages.js?601dc02c741b437bbe8be03773a37f7d896a88e7"></script> <script type="text/javascript" src="/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4"></script> <script type="text/javascript" src="/packages/simple-schema.js?19afe70e5c00d8565c4ef47f1edc175d585afd5d"></script> <script type="text/javascript" src="/packages/observe-sequence.js?2d685c5e1f0a3395de32e4cd78255cc082f7d1b5"></script> <script type="text/javascript" src="/packages/htmljs.js?a0a9082010d25b3fb44e0f56bdd0a7b4e6bbeb93"></script> <script type="text/javascript" src="/packages/ui.js?f0696b7e9407b8f11e5838e7e7820e9b6d7fc92f"></script> <script type="text/javascript" src="/packages/templating.js?b36d51fd34724d5d501d8557cd9f846874d95aef"></script> <script type="text/javascript" src="/packages/handlebars.js?038145b6256cd6a69c11650ed6bf12b093920095"></script> <script type="text/javascript" src="/packages/moment.js?b4bcca636b39d70cd42308e886f56486a1f78756"></script> <script type="text/javascript" src="/packages/collection2.js?bd93463a314a3885c31655792e794c89b4b6d1e8"></script> <script type="text/javascript" src="/packages/autoform.js?2e7388314b4975c842b17fadec463869a2d86d48"></script> <script type="text/javascript" src="/packages/webapp.js?e1be090051b82f046484dccc2de7d747e50c7328"></script> <script type="text/javascript" src="/packages/reactive-dict.js?22667928acc72f619ce81e7ac1e35def1ba9e0ae"></script> <script type="text/javascript" src="/packages/session.js?5bcd2d86431dc10d5f4be0910cb6567342e1aaf6"></script> <script type="text/javascript" src="/packages/spacebars.js?f49560fc90a8d71b7637d9596696078881b8c812"></script> <script type="text/javascript" src="/packages/global-imports.js?ce0da67660cc8128ce8e888030545c9589753258"></script> <script type="text/javascript" src="/client/components/addNewRestaurant/template.addNewRestaurant.js?9aa2fe9908bf0e6d4b5031a0bae6e1c0af2755aa"></script> <script type="text/javascript" src="/client/components/restaurantResult/template.restaurantResult.js?07e144c0cf7f2c7440c30583e2b79290499ad315"></script> <script type="text/javascript" src="/client/components/tableStatus/template.tableStatus.js?571f8faf8d41f5f9ef083b150215698c1e126904"></script> <script type="text/javascript" src="/template.cityResto.js?d4f1f1d511f90122558bfb362e065c6e20644730"></script> <script type="text/javascript" src="/lib/lib.js?c19ad4ccb8e546cf70cddf208063b693e4f519a4"></script> <script type="text/javascript" src="/client/components/addNewRestaurant/addNewRestaurant.js?4e8ed6c5511dd850c2623ed26d9845878982a005"></script> <script type="text/javascript" src="/client/components/restaurantResult/restaurantResult.js?d14bfab6e0e561b254bba690c6e9866eb76d8a33"></script> <script type="text/javascript" src="/client/components/tableStatus/tableStatus.js?4c95201203bca7491d75643f1f74d31c1e4d4e41"></script> <script type="text/javascript" src="/client/client.js?46865838cbb5bb369e3d62db42c174fd13f68b34"></script> 

所以我得到的问题是,我的lib.js函数是未定义的。

thx,凯文,

       

网上收集的解决方案 "Meteor.js:lib文件夹没有先加载"

如果有人遇到同样的问题,请查阅这篇关于meteor命名空间的文章,解决了这个问题: http : //docs.meteor.com/#namespacing

简单地删除我的libJS.js文件中的var关键字使得我的libJS.myMethod()函数可用的全局variables(具有应用程序范围)。

祝你好运