AspNetBoilerplate REACT template - error after npm start

末鹿安然 提交于 2020-06-17 02:13:23

问题


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.


回答1:


Follow steps below to check whether you miss any step:

  1. VS 2019 Open abp project
  2. Change YourProjectName.Web.Host -> appsettings.json -> ConnectionStrings.Default
  3. From VS 2019 PMC, set YourProjectName.EntityFrameworkCore as Default Project
  4. Run update-database which will create the database
  5. Set YourProjectName.Web.Host as Start Project, and run YourProjectName.Web.Host
  6. For expected result, you will get http://localhost:21021/swagger/index.html
  7. CD reactjs folder and run npm install and npm start
  8. http://localhost:3000/user/login will show up.


来源:https://stackoverflow.com/questions/57548200/aspnetboilerplate-react-template-error-after-npm-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!