Reapp错误运行示例Kitchen sink应用程序

时间:2015-04-21 09:34:14

标签: javascript reactjs

我正在尝试从hacker new app运行Reapp

在我克隆了回购后,我简单地运行了应用程序。

reapp run -V && reapp run -d 它说Your app is running on http://localhost:3010但是当我浏览网址时,我得到一个空白页面,并在控制台中显示错误。

GET http://localhost:3011/main.js not found

这是终端日志

```

Building with Webpack...
Hash: 44b4063e0df3e1a457af
Version: webpack 1.7.3
Time: 2745ms
  Asset    Size  Chunks       Chunk Names
main.js  234 kB       0       main
chunk    {0} main.js (main) 182 kB [rendered]
    [0] multi main 52 bytes {0} [built]
    [1] (webpack)-dev-server/client?http://localhost:3011 1.67 kB {0} [built]
    [2] ./app/app.js 282 bytes {0} [built] [1 error]
    [3] (webpack)/hot/only-dev-server.js 2.13 kB {0} [built]
    [4] ./app ^\.\/.*$ 1.44 kB {0} [built]
    [5] ./app/store.js 152 bytes {0} [built] [1 error]
    [6] ./app/theme/index.js 571 bytes {0} [built] [2 errors]
    [7] ./app/actions/index.js 72 bytes {0} [built]
    [8] (webpack)/hot/log-apply-result.js 811 bytes {0} [built]
    [9] ./app/actions/ArticlesActions.js 3.95 kB {0} [built] [3 errors]
   [10] ./app/actions/UsersActions.js 282 bytes {0} [built] [1 error]
   [11] ./app/theme/constants/base.js 212 bytes {0} [built]
   [12] ./app/theme/constants/components.js 216 bytes {0} [built]
   [13] ./app/theme/styles/Button.js 68 bytes {0} [optional] [built]
   [14] ./app/theme/styles/Dots.js 133 bytes {0} [optional] [built]
   [15] ./app/theme/styles/TitleBar.js 75 bytes {0} [optional] [built]
   [16] ./app/theme/styles.js 185 bytes {0} [built] [1 error]
   [17] (webpack)-dev-server/client/web_modules/socket.io/index.js 42 bytes {0} [built]
   [18] ./app/theme/styles ^\.\/.*$ 247 bytes {0} [built]
   [19] ./app/components/Articles.jsx 6.1 kB {0} [optional] [built] [3 errors]
   [20] ./app/components/articles/Article.jsx 7.03 kB {0} [optional] [built] [3 errors]
   [21] ./app/components/articles/ArticleDrawer.jsx 4.72 kB {0} [optional] [built] [3 errors]
   [22] ./app/components/articles/ArticleItem.jsx 7.16 kB {0} [built] [3 errors]
   [23] ./app/components/articles/Comment.jsx 5.54 kB {0} [built] [3 errors]
   [24] ./app/components/articles/User.jsx 3.34 kB {0} [optional] [built] [3 errors]
   [25] ./app/components/shared/LoadingIcon.jsx 3.57 kB {0} [built] [4 errors]
   [26] ./app/components/shared/RefreshButton.jsx 3.44 kB {0} [built] [3 errors]
   [27] ./app/components/shared/RotatingLoadingIcon.jsx 3.52 kB {0} [built] [3 errors]
   [28] ./app/theme/theme.css 1.51 kB {0} [built]
   [29] /usr/local/lib/~/reapp/~/reapp-pack/~/css-loader!/usr/local/lib/~/reapp/~/reapp-pack/~/autoprefixer-loader?browsers=last 2 version!./app/theme/theme.css 336 bytes {0} [built]
   [30] (webpack)-dev-server/client/web_modules/socket.io/socket.io.js 105 kB {0} [built]
   [31] /usr/local/lib/~/reapp/~/reapp-pack/~/style-loader/addStyles.js 5.51 kB {0} [built]
   [32] (webpack)/buildin/module.js 259 bytes {0} [built]
   [33] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/RootInstanceProvider.js 1.19 kB {0} [built]
   [34] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/makeExportsHot.js 1.37 kB {0} [built]
   [35] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/~/react-hot-api/modules/index.js 57 bytes {0} [built]
   [36] /usr/local/lib/~/reapp/~/reapp-pack/~/css-loader/cssToString.js 356 bytes {0} [built]
   [37] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/getRootInstancesFromReactMount.js 209 bytes {0} [built]
   [38] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/isReactClassish.js 816 bytes {0} [built]
   [39] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/isReactElementish.js 280 bytes {0} [built]
   [40] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/~/react-hot-api/modules/makeMakeHot.js 1.04 kB {0} [built]
   [41] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/~/react-hot-api/modules/makePatchReactClass.js 1.3 kB {0} [built]
   [42] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/~/react-hot-api/modules/makeAssimilatePrototype.js 1.84 kB {0} [built]
   [43] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/~/react-hot-api/modules/requestForceUpdateAll.js 903 bytes {0} [built]
   [44] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/~/react-hot-api/modules/deepForceUpdate.js 1.23 kB {0} [built]
   [45] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/~/react-hot-api/modules/bindAutoBindMethods.js 1.95 kB {0} [built]
   [46] /usr/local/lib/~/reapp/~/reapp-pack/~/react-hot-loader/~/react-hot-api/modules/traverseRenderedChildren.js 479 bytes {0} [built]

WARNING in ./app/app.js
Critical dependencies:
14:7-14 require function is used in a way, in which dependencies cannot be statically extracted
 @ ./app/app.js 14:7-14

ERROR in Entry module not found: Error: Cannot resolve module 'react' in /home/jay/hacker-news-app

ERROR in Entry module not found: Error: Cannot resolve module 'react/lib/ReactComponentBrowserEnvironment' in /home/jay/hacker-news-app

ERROR in ./app/app.js
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app
 @ ./app/app.js 9:16-36

ERROR in ./app/store.js
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app
 @ ./app/store.js 3:12-32

ERROR in ./app/theme/index.js
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/theme
 @ ./app/theme/index.js 5:12-32

ERROR in ./app/theme/index.js
Module not found: Error: Cannot resolve module 'reapp-kit/themes/ios' in /home/jay/hacker-news-app/app/theme
 @ ./app/theme/index.js 7:26-57

ERROR in ./app/theme/styles.js
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/theme
 @ ./app/theme/styles.js 3:17-37

ERROR in ./app/actions/ArticlesActions.js
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/actions
 @ ./app/actions/ArticlesActions.js 5:16-36

ERROR in ./app/actions/UsersActions.js
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/actions
 @ ./app/actions/UsersActions.js 3:16-36

ERROR in ./app/actions/ArticlesActions.js
Module not found: Error: Cannot resolve module 'reapp-reducer' in /home/jay/hacker-news-app/app/actions
 @ ./app/actions/ArticlesActions.js 11:30-54

ERROR in ./app/actions/ArticlesActions.js
Module not found: Error: Cannot resolve module 'parseurl' in /home/jay/hacker-news-app/app/actions
 @ ./app/actions/ArticlesActions.js 13:31-50

ERROR in ./app/components/articles/Article.jsx
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/Article.jsx 1:378-409

ERROR in ./app/components/articles/Article.jsx
Module not found: Error: Cannot resolve module 'react' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/Article.jsx 1:419-435 173:367-383

ERROR in ./app/components/articles/Article.jsx
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/Article.jsx 19:16-36

ERROR in ./app/components/Articles.jsx
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /home/jay/hacker-news-app/app/components
 @ ./app/components/Articles.jsx 1:378-409

ERROR in ./app/components/Articles.jsx
Module not found: Error: Cannot resolve module 'react' in /home/jay/hacker-news-app/app/components
 @ ./app/components/Articles.jsx 1:419-435 131:367-383

ERROR in ./app/components/Articles.jsx
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/components
 @ ./app/components/Articles.jsx 15:16-36

ERROR in ./app/components/articles/ArticleDrawer.jsx
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/ArticleDrawer.jsx 1:378-409

ERROR in ./app/components/articles/ArticleDrawer.jsx
Module not found: Error: Cannot resolve module 'react' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/ArticleDrawer.jsx 1:419-435 109:367-383

ERROR in ./app/components/articles/ArticleDrawer.jsx
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/ArticleDrawer.jsx 11:16-36

ERROR in ./app/components/articles/ArticleItem.jsx
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/ArticleItem.jsx 1:378-409

ERROR in ./app/components/articles/ArticleItem.jsx
Module not found: Error: Cannot resolve module 'react' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/ArticleItem.jsx 1:419-435 218:367-383

ERROR in ./app/components/articles/ArticleItem.jsx
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/ArticleItem.jsx 15:16-36

ERROR in ./app/components/articles/Comment.jsx
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/Comment.jsx 1:378-409

ERROR in ./app/components/articles/Comment.jsx
Module not found: Error: Cannot resolve module 'react' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/Comment.jsx 1:419-435 150:367-383

ERROR in ./app/components/articles/Comment.jsx
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/Comment.jsx 11:16-36

ERROR in ./app/components/articles/User.jsx
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/User.jsx 1:378-409

ERROR in ./app/components/articles/User.jsx
Module not found: Error: Cannot resolve module 'react' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/User.jsx 1:419-435 59:367-383

ERROR in ./app/components/articles/User.jsx
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/components/articles
 @ ./app/components/articles/User.jsx 11:16-36

ERROR in ./app/components/shared/LoadingIcon.jsx
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /home/jay/hacker-news-app/app/components/shared
 @ ./app/components/shared/LoadingIcon.jsx 1:378-409

ERROR in ./app/components/shared/LoadingIcon.jsx
Module not found: Error: Cannot resolve module 'react' in /home/jay/hacker-news-app/app/components/shared
 @ ./app/components/shared/LoadingIcon.jsx 1:419-435 56:367-383

ERROR in ./app/components/shared/LoadingIcon.jsx
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/components/shared
 @ ./app/components/shared/LoadingIcon.jsx 13:16-36

ERROR in ./app/components/shared/LoadingIcon.jsx
Module not found: Error: Cannot resolve module 'reapp-kit/icons/arrow-refresh.svg' in /home/jay/hacker-news-app/app/components/shared
 @ ./app/components/shared/LoadingIcon.jsx 37:18-62

ERROR in ./app/components/shared/RefreshButton.jsx
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /home/jay/hacker-news-app/app/components/shared
 @ ./app/components/shared/RefreshButton.jsx 1:378-409

ERROR in ./app/components/shared/RefreshButton.jsx
Module not found: Error: Cannot resolve module 'react' in /home/jay/hacker-news-app/app/components/shared
 @ ./app/components/shared/RefreshButton.jsx 1:419-435 48:367-383

ERROR in ./app/components/shared/RefreshButton.jsx
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/components/shared
 @ ./app/components/shared/RefreshButton.jsx 15:16-36

ERROR in ./app/components/shared/RotatingLoadingIcon.jsx
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /home/jay/hacker-news-app/app/components/shared
 @ ./app/components/shared/RotatingLoadingIcon.jsx 1:378-409

ERROR in ./app/components/shared/RotatingLoadingIcon.jsx
Module not found: Error: Cannot resolve module 'react' in /home/jay/hacker-news-app/app/components/shared
 @ ./app/components/shared/RotatingLoadingIcon.jsx 1:419-435 52:367-383

ERROR in ./app/components/shared/RotatingLoadingIcon.jsx
Module not found: Error: Cannot resolve module 'reapp-kit' in /home/jay/hacker-news-app/app/components/shared
 @ ./app/components/shared/RotatingLoadingIcon.jsx 15:16-36
webpack: bundle is now VALID.

Note: you have a require warning on your routes, this is ok!

```

1 个答案:

答案 0 :(得分:3)

好,

首先尝试运行

  

npm install

项目中的

package.json所在的位置),之后使用reapp run -V && reapp run -d运行应用。这样就可以使用webpack所需的依赖项。

P.S。不要忘记必须首先安装reapp(使用npm install -g reapp),但您已完成该步骤。