0

尝试开始使用 Famo.us 示例。我按照 Github 页面上的步骤进行操作,当我执行“grunt serve”时,浏览器会打开,但出现以下错误:

    Failed to load resource: the server responded with a status of 404 (Not Found)
    http://localhost:1337/lib/famous-polyfills/functionPrototypeBind.js
    Failed to load resource: the server responded with a status of 404 (Not Found)  
    http://localhost:1337/lib/famous-polyfills/classList.js
    Failed to load resource: the server responded with a status of 404 (Not Found) 
    http://localhost:1337/lib/famous/core/famous.css
    Failed to load resource: the server responded with a status of 404 (Not Found)    
    http://localhost:1337/lib/famous-polyfills/requestAnimationFrame.js
    Failed to load resource: the server responded with a status of 404 (Not Found)   
    http://localhost:1337/lib/requirejs/require.js

使用 Chrome 在 Windows 7 上运行它。知道如何解决这个问题吗?

4

2 回答 2

5

您是否尝试过运行“凉亭安装”?当你运行“yo Famous”时,所有这些依赖项都应该默认通过 bower 安装,但我见过一些没有安装的实例。

我会忽略上面关于通过 github 克隆的建议,还有其他依赖项,包括 require.js 和 almond,这些依赖项不会使用该方法安装

此外,就缩小版本而言……如果您运行“grunt”命令,您将通过 require.js / almond 为您提供所有依赖项的缩小、缓存破坏版本。这比简单地拥有库的缩小版本要好,因为它只会链接使用的模块。

FWIW我是该工具的作者:D

于 2014-05-03T04:07:23.973 回答
0

根据您的评论。如果这些文件不存在,您需要使它们存在。奇怪的是这些文件不是使用 ToolBelt 创建的。

只需去 github 并获取您丢失的文件。

著名/核心:https ://github.com/Famous/core

著名的polyfills:https ://github.com/Famous/polyfills

需要js:https ://github.com/Famous/examples/tree/master/src/lib

** 编辑 **

该工具的作者提交了更好的答案。请阅读 TheAlphNerd 的回复。

于 2014-05-02T15:39:19.320 回答