我的情况
我正在查看 spin.js 以获取我正在考虑编写的 Web 应用程序。我已阅读所有文档并浏览了所有示例。现在,我尝试在我自己的 Windows 7 笔记本电脑上运行 spin.contacts 示例项目。
我正在运行适用于 Windows 的节点 v0.6.6
我做了什么
- 已安装节点
- 通过npm安装了spine、spine-app和heme
- 将spine.contacts提取到文件夹中
- Run
npm install .
在文件夹里面,创建了node_modules文件夹,里面有一堆目录,包括jqueryify
- Run
hem server
启动测试服务器
- 基本上遵循了所有的指示
问题
在 Chrome (http://localhost:9294) 中运行应用程序,JavaScript 在 index.html 的第 9 行抛出异常(我在下面包含了 index.html)。它显示“未找到未捕获的 jqueryify 模块”。我知道 jqueryify 依赖项是由 npm 早些时候安装的,但我尝试删除该行并手动链接到 jQuery。现在我在 application.js 中收到错误“未找到未捕获的模块索引”。这当然不是依赖错误,因为 index.js 文件是本地的,并且它是项目中的主脚本文件。
所以看来 require 函数有问题。我在 Google 上搜索了很多,但没有发现任何表明 spin.js 不应该在 Windows 上运行的情况。
有任何想法吗?
一些链接
-
spin.contacts 的 GIT 页面 https://github.com/maccman/spine.contacts
- herokuapp.com 上完全相同项目的演示 http://spine-contacts.herokuapp.com/
索引.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 不支持折边。我发现自己处于同样的情况并尝试了同样的方法。
更多信息请点击这里:https://github.com/maccman/hem/issues/23 https://github.com/maccman/hem/issues/23
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)