couchapp does not generate loader.js

狂风中的少年 提交于 2019-12-23 05:44:07

问题


I'm trying to use couchapp to manage my CouchDB application, but it's missing a crucial file after generating the project, loader.js. It looks like this is an existing issue (for the last 6 months) that hasn't been addressed by the couchapp team.

I first tried to upgrade the vendor folder, but this didn't work:

couchapp vendor update git://github.com/couchapp/vendor.git
2012-02-13 22:57:50 [CRITICAL] vendor `git://github.com/couchapp/vendor.git` doesn't exist

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/couchapp/dispatch.py", line 48, in dispatch
    return _dispatch(args)
  File "/usr/local/lib/python2.7/dist-packages/couchapp/dispatch.py", line 92, in _dispatch
    return fun(conf, conf.app_dir, *args, **opts)
  File "/usr/local/lib/python2.7/dist-packages/couchapp/commands.py", line 294, in vendor
    vendor_update(conf, dest, vendorname, *args, **opts)
  File "/usr/local/lib/python2.7/dist-packages/couchapp/vendors/__init__.py", line 14, in vendor_update
    vendor.update(dest, name, *args, **opts)
  File "/usr/local/lib/python2.7/dist-packages/couchapp/vendors/base.py", line 139, in update
    raise VendorError("vendor `%s` doesn't exist" % name)
VendorError: vendor `git://github.com/couchapp/vendor.git` doesn't exist

I then tried to simply copy the loader.js file into vendor/couchapp/_attachments, but this didn't work either.

Does anyone have a workaround to allow loader.js to function properly?


回答1:


loader.js seems to be deprecated from couchapp. Instead, explicitly call each script you need.

<script src="/_utils/script/sha1.js"></script>
<script src="/_utils/script/json2.js"></script>
<script src="/_utils/script/jquery.js"></script>
<script src="/_utils/script/jquery.couch.js"></script>
<script src="vendor/couchapp/jquery.couchLogin.js"></script>
<script src="vendor/couchapp/jquery.couchProfile.js"></script>
<script src="vendor/couchapp/md5.js"></script>
<script src="vendor/couchapp/jquery.mustache.js"></script>


来源:https://stackoverflow.com/questions/9271452/couchapp-does-not-generate-loader-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!