[英]Could not find required file index.html in react js
Hi I am working in react application.您好,我正在研究 React 应用程序。 I have deployed app in kube.netes.
我已经在 kube.netes 中部署了应用程序。 I have below folder structure in react app
我在反应应用程序中有以下文件夹结构
Below is my Dockerfile下面是我的Dockerfile
# Fetching the latest node image on apline linux
FROM node:alpine AS development
# Declaring env
ENV NODE_ENV development
# Setting up the work directory
WORKDIR /al.web
# Installing dependencies
RUN pwd
RUN ls
COPY ./al.web/package.json /al.web
RUN npm install
# Copying all the files in our project
COPY . .
# Starting our application
CMD npm start
When I run the application in kube.netes I get below error当我在 kube.netes 中运行应用程序时,出现以下错误
I am not sure what configuration is wrong here.我不确定这里的配置有什么问题。 Can someone help me to fix the the issue.
有人可以帮我解决这个问题吗? Any help would be appreciated.
任何帮助,将不胜感激。 Thanks
谢谢
if you want your react app to start use npm start in the project folder if your project root folder isn't installed properly use npx create-react-app appname如果你想让你的反应应用程序开始使用npm在项目文件夹中启动如果你的项目根文件夹没有正确安装使用npx create-react-app appname
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.