Uncaught module jqueryify not found

My situation

I’m checking out spine.js for a web application I’m thinking of writing. I’ve read all the documentation and gone through all the examples. Now I’m trying to run the spine.contacts example project on my own Windows 7 laptop.

I’m running node v0.6.6 for Windows

What I’ve done

  • Installed node
  • Installed spine, spine-app and hem through npm
  • Extracted spine.contacts in a folder
  • Run npm install .
    inside the folder, which created the node_modules folder with a bunch of directories inside, including jqueryify
  • Run hem server
    to start the test server
  • Basically followed all the instructions to the letter

The problem

Running the application in Chrome (http://localhost:9294), JavaScript throws an exception at line 9 in index.html (I’ve included index.html below). It reads “Uncaught module jqueryify not found”. I know the jqueryify dependency was installed by npm earlier, but I tried removing that line anyway and linking in jQuery manually. Now I got the error “Uncaught module index not found” in application.js. That certainly isn’t a dependency error, since the index.js file is local and it’s the main script file in the project.

So it seems there’s a problem with the require function. I’ve Googled a lot and nothing I’ve found has indicated that spine.js shouldn’t work on Windows.

Any ideas?

Some links

index.html:


  
  App
  
  
  
    var jQuery  = require("jqueryify"); // I'm line 9!!
    var exports = this;
    jQuery(function(){
      var App = require("index");
      exports.app = new App({el: $("#article")});      
    });
    


  
  

Problem courtesy of: Hubro

稿源:Node.js Recipes (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 前端开发 » Uncaught module jqueryify not found

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录