首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm开始找不到JSON文件

npm开始找不到JSON文件
EN

Stack Overflow用户
提问于 2017-06-28 04:01:53
回答 1查看 1.8K关注 0票数 1

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

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

代码语言:javascript
复制
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文件中:

代码语言:javascript
复制
{
  "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应用程序中的内容,并从中生成组件并在react应用程序中运行)。

有什么想法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-28 06:10:23

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

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44793438

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档