我刚刚从他们的网站上重新安装了一个带有软件包的节点,并克隆了一个旧项目。我正在尝试运行npm start,但是我得到了一个错误堆栈。
tweety@0.1.0start /Users/username/Code/projects/phase-3/lil-twitter-react-challenge/tweety react脚本启动
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应用程序中的内容,并从中生成组件并在react应用程序中运行)。
有什么想法吗?
发布于 2017-06-28 06:10:23
在启动应用程序之前,您需要运行npm install来安装所有依赖项。
https://stackoverflow.com/questions/44793438
复制相似问题