找不到未捕获的模块jqueryify [英] Uncaught module jqueryify not found
问题描述
我正在检查spine.js我正在考虑编写的Web应用程序。我已经阅读了所有文档,并完成了所有示例。现在我正在尝试在我自己的Windows 7笔记本电脑上运行spine.contacts示例项目。
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.
我正在为Windows运行节点v0.6.6
I'm running node v0.6.6 for Windows
- 已安装节点
- 通过npm安装脊椎,脊柱应用程序和下摆
- 在文件夹中提取spine.contacts
- 运行
npm install。
在文件夹内,创建了node_modules文件夹,里面有一堆目录,包括jqueryify - 运行
下摆服务器
启动测试服务器 - 基本上遵循信中的所有说明
- 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
在Chrome中运行应用程序(http:// localhost:9294),JavaScript在index.html的第9行引发异常(我在下面包含了index.html) )。它显示找不到未捕获的模块jqueryify。我知道jqueryify依赖项是由npm先前安装的,但我尝试删除该行,并手动链接在jQuery中。现在我在application.js中收到错误未找到模块索引。这当然不是一个依赖性错误,因为index.js文件是本地的,它是项目中的主要脚本文件。
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.
所以看来这个问题是要求功能。我google了很多,我发现没有任何内容表明spine.js不适用于Windows。
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.
任何想法?
- The GIT page for spine.contacts
- A demo of the exact same project on herokuapp.com
index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>App</title>
<link rel="stylesheet" href="/application.css" type="text/css" charset="utf-8">
<script src="/application.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
var jQuery = require("jqueryify"); // I'm line 9!!
var exports = this;
jQuery(function(){
var App = require("index");
exports.app = new App({el: $("#article")});
});
</script>
</head>
<body>
<header id="header"><h1>Spine Contacts</h1></header>
<article id="article"></article>
</body>
</html>
推荐答案
Windows不支持下载。我发现自己处于相同的情况并尝试了相同的方法。
Hem is not supported on Windows. I found myself in the same situation and tried the same approaches.
此处有更多信息: https://github.com/maccman/hem/issues/23
这篇关于找不到未捕获的模块jqueryify的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!