【问题标题】:NPM error when trying to install React.js TODO-MVC Tutorial尝试安装 React.js TODO-MVC 教程时出现 NPM 错误
【发布时间】:2015-08-07 10:36:16
【问题描述】:

我正在尝试从 github (link) 安装 react.js Flux-todomvc 教程,但是在克隆 repo、运行 NPM install、然后运行 ​​NPM start 之后,NPM 返回如下错误:

peter@peter-ThinkPad-X220 ~/projects/www/flux-todomvc/flux $ npm install

> flux@2.0.3 prepublish /home/peter/projects/www/flux-todomvc/flux
> gulp publish

[15:36:43] Using gulpfile ~/projects/www/flux-todomvc/flux/Gulpfile.js
[15:36:43] Starting 'publish'...
[15:36:43] Starting 'clean'...
[15:36:43] Finished 'clean' after 14 ms
[15:36:43] Starting 'lib'...
[15:36:43] Finished 'lib' after 69 ms
[15:36:43] Starting 'browserify'...
[15:36:43] Finished 'browserify' after 85 ms
[15:36:43] Starting 'build'...
[15:36:43] Finished 'build' after 4.94 μs
[15:36:43] Finished 'publish' after 172 ms
peter@peter-ThinkPad-X220 ~/projects/www/flux-todomvc/flux $ npm start
npm ERR! Linux 3.13.0-37-generic
npm ERR! argv "node" "/home/peter/.nvm/versions/node/v0.12.0/bin/npm" "start"
npm ERR! node v0.12.0
npm ERR! npm  v2.10.1

npm ERR! missing script: start
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/peter/projects/www/flux-todomvc/flux/npm-debug.log

有人知道如何解决这个问题吗?

【问题讨论】:

    标签: node.js npm reactjs todomvc


    【解决方案1】:

    我想通了,也许这是一个非常简单的错误,但也许这会帮助其他发现文档不清楚的人(就像我一样)。

    运行 npm 命令(npm install 和 npm start)时,您需要位于示例项目的根文件夹中,而不是 github 存储库的根文件夹中。

    换句话说,要安装和运行 todoMVC 示例项目,您应该在以下目录中:

    flux/examples/flux-todomvc
    

    不在此目录中

    flux/
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-04
      • 2019-01-17
      • 1970-01-01
      • 2014-08-15
      • 2016-09-14
      • 1970-01-01
      • 1970-01-01
      • 2021-11-03
      相关资源
      最近更新 更多