问题
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:
- 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.
来源:https://stackoverflow.com/questions/57548200/aspnetboilerplate-react-template-error-after-npm-start