我正在尝试将 TW5 的服务器版本作为 node-webkit 应用程序运行。我遵循了此处所述的良好说明:https ://groups.google.com/d/msg/tiddlywiki/WRnhjD6LUPQ/Zmikdvo0QA0J
- 要在 node-webkit 中运行这些文件,您需要的代码在这里:https ://gist.github.com/Arlen22/d7ad0b6a108fa3cedf72
- 打开该链接并将 index.htm 和 nodewebkit.js 复制到 tiddlywiki 文件夹的根目录中。
- 打开 package.json,将 gist 的 package.json 中的两个对象复制到其中。
- Package.json 已经有一个“主要”对象,您需要将其删除。
- 将整个 tiddlywiki 文件夹拖到 node-webkit 可执行文件上。
当我执行最后一步时,我在 node-webkit 的开发人员工具控制台上收到以下错误:
Uncaught ReferenceError: require is not defined
Not allowed to load local resource: file:///C:/Users/.../node-webkit/TW5/index.htm data:text/html,chro…:1
奇怪的是:如果我从地址栏中删除 index.html,则会列出 TW5 文件夹,然后单击 index.html 按预期打开应用程序,完美运行。有人可以告诉我问题出在哪里吗?
提前致谢。