AspNetBoilerplate REACT模板-npm启动后出错 [英] AspNetBoilerplate REACT template - error after npm start
问题描述
今天,我下载了ABP Asp.Net Core REACT SPA模板.下载后,我运行了npm install,然后启动了npm.这两个步骤有效,没有问题. 一旦REACT应用程序启动,浏览器就会打开,我得到的只是一个空白页.然后几秒钟后,出现以下错误对话框. 当我查看Chrome控制台时,发现以下错误. 我是REACT的新手,现在仍然在学习它.因此,我可以使用一些帮助来跟踪此错误. 请注意,我确实运行了migrator项目,并在PC上安装了数据库,并更新了连接字符串以确保.NET代码的连通性.
Today I downloaded the ABP Asp.Net Core REACT SPA template. After downloading, I ran npm install and then npm start. These two steps worked, no issues. Once the REACT app has started, the browser opens up and all I get is a blank page. Then after a few seconds the below error dialog box comes up. When I look at the chrome console, I find the errors shown below. I'm new to REACT and very much still learning it. So I could use some help in tracking this error down. Please note I did run the migrator project and got the DB setup on my PC and updated the connection strings to ensure connectivity for the .NET code.
推荐答案
请按照以下步骤检查您是否错过任何步骤:
Follow steps below to check whether you miss any step:
- VS 2019 Open abp项目
- 更改
YourProjectName.Web.Host
->appsettings.json
->ConnectionStrings.Default
- 在VS 2019 PMC中,将
YourProjectName.EntityFrameworkCore
设置为默认项目 - 运行
update-database
将创建数据库 - 将
YourProjectName.Web.Host
设置为Start Project,然后运行YourProjectName.Web.Host
- 为获得预期结果,您将获得
http://localhost:21021/swagger/index.html
- CD
reactjs
文件夹并运行npm install
和npm start
-
http://localhost:3000/user/login
将会出现.
- VS 2019 Open abp project
- Change
YourProjectName.Web.Host
->appsettings.json
->ConnectionStrings.Default
- From VS 2019 PMC, set
YourProjectName.EntityFrameworkCore
as Default Project - Run
update-database
which will create the database - Set
YourProjectName.Web.Host
as Start Project, and runYourProjectName.Web.Host
- For expected result, you will get
http://localhost:21021/swagger/index.html
- CD
reactjs
folder and runnpm install
andnpm start
http://localhost:3000/user/login
will show up.
这篇关于AspNetBoilerplate REACT模板-npm启动后出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!