简体   繁体   English

有人可以帮我这个 React 开始吗?

[英]Can someone please help me with this React start?

I have downloaded some code from Github which uses React.我已经从 Github 下载了一些使用 React 的代码。

I get the following error when I run npm start in the terminal.在终端中运行 npm start 时出现以下错误。

  The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
apples-iMac:redux-code-master apple$ npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/apple/Documents/redux-code-master/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/apple/Documents/redux-code-master/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/apple/.npm/_logs/2020-10-23T14_20_03_880Z-debug.log
apples-iMac:redux-code-master apple$ 

Can anyone please tell me how to overcome this issue?谁能告诉我如何克服这个问题?

From your error log it seems package.json file is missing from your project.从您的错误日志看来,您的项目中缺少package.json文件。 If it exist and you want to build project for relative path then use如果它存在并且您想为相对路径构建项目,则使用

"homepage": "http://mywebsite.com/relativepath",

in your package.json file.在您的package.json文件中。 Find more about building for relative path at here此处查找有关构建相对路径的更多信息

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有人可以向我解释一下这个答案:React embed components into one - Can someone please explain me the answer of this: React embed components into one React Native:有人可以帮我制作自定义警报吗? - React Native: Can someone help me make a custom alert? 有人可以帮助我将Codepen转换为React Sandbox小提琴吗? - Can someone help me convert an codepen into an react sandbox fiddle? 有人可以帮我将 typescript 代码转换为 React 代码吗 - Can Someone help me to convert typescript code to React Code react-native-admob 中的错误,有人可以帮助我吗? - Error in react-native-admob, Can someone help me? 反应 onChange 不起作用。 有人能帮我吗? - React onChange is not working. Can someone help me? React 中的插值不能以这种方式工作,有人可以在这方面帮助我吗? - Interpolation in React is not working this way can anybody please help me in this regards? 有人可以帮我在 v6 中使用 useEffect 挂钩修复 match.params.id 吗? - Can someone please help me fix match.params.id using useEffect hook in v6? 当我编写 npm start 并收到此错误时,我的反应应用程序没有启动,任何人都可以帮助我,我是新来的反应。 我正在使用 Acode(Editor) 和 termux - My react app does not start when I write npm start and get this error can anyone please help me I am new to react. I am using Acode(Editor) and termux React.js:有人可以向我详细说明这一行吗 - Reactjs : Can someone please elaborate this line to me
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM