AspNetBoilerplate REACT模板-npm启动后出错 [英] AspNetBoilerplate REACT template - error after npm start

查看:78
本文介绍了AspNetBoilerplate REACT模板-npm启动后出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我下载了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:

  1. VS 2019 Open abp项目
  2. 更改YourProjectName.Web.Host-> appsettings.json-> ConnectionStrings.Default
  3. 在VS 2019 PMC中,将YourProjectName.EntityFrameworkCore设置为默认项目
  4. 运行update-database将创建数据库
  5. YourProjectName.Web.Host设置为Start Project,然后运行YourProjectName.Web.Host
  6. 为获得预期结果,您将获得http://localhost:21021/swagger/index.html
  7. CD reactjs文件夹并运行npm installnpm start
  8. http://localhost:3000/user/login将会出现.
  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.

这篇关于AspNetBoilerplate REACT模板-npm启动后出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆