安装 webpack React 和 Redux npm 时出错

Error when installing webpack React and Redux npm

我正在关注 newboston Youtube 频道上关于 React 和 Redux 的教程,但是当我导航到提供文件的目录时无法安装依赖项。这是 link,我完全按照视频开头的提示 https://www.youtube.com/watch?v=TSAw5f8mOQs&list=PL6gx4Cwl9DGBbSLZjvleMwldX8jGgXV6a&index=3

这是我得到的错误:

:~$ npm install
npm ERR! install Couldn't read dependencies
npm ERR! Error: ENOENT, open '/home/joe/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.19.0-56-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/joe
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/joe/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/joe/npm-debug.log
npm ERR! not ok code 0

你不见了package.json。

有两种可能:

您想创建新的package.json

如果您想创建一个新的 package.json,请使用 npm init 命令来设置您的 package.json。

您已经有一些带有 package.json

的代码

如果您已经从某个 repo 获得了一些代码,cd 到您拥有 package.json 的目录并执行 npm installnpm i