“反应脚本”不被识别为内部或外部命令、可操作程序或批处理文件。 json 文件已删除
错误是“react-scripts”未被识别为内部或外部命令, 可运行的程序或批处理文件。 我试过
npm install
npm install react-scripts --save
npm i -g react-scripts
the errror is 'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
ive tried
npm install
npm install react-scripts --save
npm i -g react-scripts
https://github.com/mareyam/Complete-Maryam-s-Restaurant
i uploaded this code on github without .json file
now im trying to donwnload and use it but cant because ,json file ive lost. ive tried using json file from anothr project but not working
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议使用
create-react-app
来构建这个项目。运行命令,cd 进入目录,然后启动应用程序。这对于开发来说已经足够了,您可以将所有组件添加到
src/
文件夹中。 这里有关如何开始构建 React Web 应用程序的文档。要获得生产版本(我认为这就是您想要的),请运行 npm run build ,这会将构建保存在 build/ 文件夹中。
每当您使用不同的机器时,只需从 github 中提取项目并运行
npm i
即可。我假设您正在谈论package.json
文件。如果您正确设置了所有内容,这应该不是什么大问题。I would recommend using
create-react-app
to build this project. Run the command, cd into the directory then start the app.This will be good enough for development, and you can add all your components into the
src/
folder. Here's the documentation for how to start building react web apps.To get the production build (which I think is what you're trying to go for), run
npm run build
which will save the build in thebuild/
folder.Any time you use a different machine, just pull the project from github and run
npm i
. I'm assuming that you were talking about thepackage.json
file. This shouldn't be a big deal if you set everything up correctly.