简体   繁体   English

在反应 js 中找不到所需的文件 index.html

[英]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.

相关问题 “找不到所需的文件。名称:index.html”在 Heroku 上部署 React 应用程序时出错 - "Could not find a required file. Name: index.html" Error When Deploying React App on Heroku 找不到所需的文件。 名称:index.html 与 docker compose 反应 - Could not find a required file. Name: index.html in react with docker compose Heroku “找不到所需文件。 名称:index.html” - Heroku “Could not find a required file. Name: index.html” 找不到所需的文件。 名称:index.html - Could not find a required file. Name: index.html 找不到所需的文件 index.html - Heroku 推送错误 - Could not find a required file index.html - Heroku push error 部署到 Netlify 时找不到所需的文件 index.html - Could not find a required file, index.html while deploying to Netlify 如何在 react js 中的 index.html 文件中添加条件 - How to add condition in index.html file in react js 从index.html调用.js文件(反应) - Calling a .js file (react) from index.html React js index.html react道具 - React js index.html react props “找不到所需的文件。 remote: Name: index.html” 这是我在通过 Heroku、Zeit/Now 或 Netlify 部署 ReactJS 应用程序时遇到的错误 - “Could not find a required file. remote: Name: index.html” This the error I get whenever I deploy my ReactJS app via Heroku, Zeit/Now or Netlify
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM