gpt4 book ai didi

node.js - 尝试安装 React.js 时出现 NPM 错误 TODO-MVC Tutorial

转载 作者:搜寻专家 更新时间:2023-10-31 23:47:53 28 4
gpt4 key购买 nike

我正在尝试从 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

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

最佳答案

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

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

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

flux/examples/flux-todomvc

在此目录中:

flux/

关于node.js - 尝试安装 React.js 时出现 NPM 错误 TODO-MVC Tutorial,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30446935/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com