npm开始无法找到JSON文件

时间:2017-06-28 04:01:53

标签: npm

我刚从他们的网站重新安装了包的节点并克隆了一个旧项目。我正在尝试运行npm start,但我得到一个错误堆栈。

  

tweety@0.1.0 start / Users / username / Code / projects / phase-3 / lil-twitter-react-challenge / tweety   react-scripts启动

sh: react-scripts: command not found

npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! tweety@0.1.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the tweety@0.1.0 start script 'react-scripts start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tweety package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-scripts start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tweety
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tweety
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/username/tweety/npm-debug.log

在我的package.json文件中:

{
  "name": "tweety",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "react-scripts": "1.0.7"
  },
  "dependencies": {
    "react": "^15.5.4",
    "react-dom": "^15.5.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

我的项目(tweety)中的文件是:

README.md npm-debug.log package.json public src

这是Rails应用程序中的一个文件夹(尝试从rails应用程序解析内容并从中创建组件并在反应应用程序中运行它)。

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

在启动应用程序之前,您需要运行npm install来安装所有依赖项。