8 Replies - 568 Views - Last Post: 10 August 2018 - 06:51 AM Rate Topic: -----

#1 John Alexiadis   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 21-June 18

Problem with ASP.NET yarn integration

Posted 09 August 2018 - 12:50 PM

Hello! I am trying to create a simple website using ASP.NET Core 2. At some point, I wanted to install a javascript package called "Bootstrap Table". I found out that the best modern way, would be to use npm or yarn. So I decided to give yarn a go. I installed it and successfully integrated in Visual Studio and to my project. The firs thing that I did was to install jquery and bootstrap. Then, I installed bootstrap-table as well. When I opened my website to see if everything was Ok, I saw that my website was completely messed up (photo bellow). I thought that I should remove the packages that I installed, so through yarn again, I removed jquery, bootstrap and bootstrap-table. I opened my website again, but I saw again the same mess. The only thing that I observed, is that even though I removed the packages successfully from yarn, the folders and the files are still there. Maybe is this the problem ? Anyway, here is a photo of how my website index (the default asp.net core index) looks like right now:

http://i.imgur.com/1AkCVAx.png
Posted Image

As you can see everything is messed up. There is not even my menu in there. I am so frustrated right now that I feel like quitting, so if there is anyone that can tip me on how to fix that mess, it would be great.

Thank you in advance!

Is This A Good Question/Topic? 0
  • +

Replies To: Problem with ASP.NET yarn integration

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14925
  • View blog
  • Posts: 59,591
  • Joined: 12-June 08

Re: Problem with ASP.NET yarn integration

Posted 09 August 2018 - 01:31 PM

Have you considered skipping Yarn for the moment, and just adding things to the right folders and _layout ?
Was This Post Helpful? 0
  • +
  • -

#3 John Alexiadis   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 21-June 18

Re: Problem with ASP.NET yarn integration

Posted 09 August 2018 - 02:15 PM

Have you considered replying to the actual question instead of trying to correct me for something that you do no know how I structured it ?
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14925
  • View blog
  • Posts: 59,591
  • Joined: 12-June 08

Re: Problem with ASP.NET yarn integration

Posted 09 August 2018 - 02:17 PM

Damn dude, chillax. It sounded like you were just trying to get a few JS files added to continue on your development process but got bogged down with some third party tool. It wasn't clear you were using this simple Razor page project to _LEARN_ Yarn.
Was This Post Helpful? 0
  • +
  • -

#5 John Alexiadis   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 21-June 18

Re: Problem with ASP.NET yarn integration

Posted 09 August 2018 - 02:28 PM

Ι don't understand if your comment is ironic or not. Anyway, I opened this simple project with the only purpose of understanding how yarn works, but the only thing I get, is my hole project getting **** **.
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14925
  • View blog
  • Posts: 59,591
  • Joined: 12-June 08

Re: Problem with ASP.NET yarn integration

Posted 09 August 2018 - 02:30 PM

I am not certain how my post would be considered ironic, but so it goes.

Which flavor of Core 2 are you using Razor pages or MVC?
Was This Post Helpful? 0
  • +
  • -

#7 John Alexiadis   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 21-June 18

Re: Problem with ASP.NET yarn integration

Posted 09 August 2018 - 04:22 PM

Oh, then I am sorry; I misunderstood. I am using razor pages.
Was This Post Helpful? 0
  • +
  • -

#8 John Alexiadis   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 21-June 18

Re: Problem with ASP.NET yarn integration

Posted 10 August 2018 - 01:47 AM

I though that a good idea would be to replace all the contents of the wwwroot folder with the wwwroot folder of another newly created project. Still I have the same problem though.
Was This Post Helpful? 0
  • +
  • -

#9 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14925
  • View blog
  • Posts: 59,591
  • Joined: 12-June 08

Re: Problem with ASP.NET yarn integration

Posted 10 August 2018 - 06:51 AM

You certainly can do that, but - like any web page - make sure to include them. With Razor I would inspect the _layout template file.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1