Giter VIP home page Giter VIP logo

Comments (23)

cof-tdawson avatar cof-tdawson commented on May 29, 2024 2

removing the files property and array avoids the error

from librarymanager.

cof-tdawson avatar cof-tdawson commented on May 29, 2024 1

Still broken on 15.8.0 Preview 4.0 that came out today:

image

from librarymanager.

jodavis avatar jodavis commented on May 29, 2024

@justcla, please investigate why we're reporting a syntax error in seemingly valid JSON.

from librarymanager.

justcla avatar justcla commented on May 29, 2024

I tested this on the latest build from master.

I put the same json into a libman.json file in a new ASP.NET (Framework) MVC app that had a "node_modules/jquery/dist" dir with the two jquery files listed and it ran perfectly.

`

{
  "version": "1.0",
  "defaultProvider": "filesystem",
  "libraries": [
    {
      "library": "node_modules/jquery/dist/",
      "destination": "Scripts/lib/jquery",
      "files": [ "jquery.min.js", "jquery.min.map" ]
    }
  ]
}

`

image

from librarymanager.

justcla avatar justcla commented on May 29, 2024

Unable to reproduce with the latest code.
Please update to the latest version of Library Manager.

from librarymanager.

adamreed90 avatar adamreed90 commented on May 29, 2024

Same issue for me as well, removing the files block also stopped the error. If on a new ASP.NET Core 2.1 project in VS, using Add Client-Side Library creates a libman.json file that will not pass syntax checking, to test add "twitter-bootstrap" package. Reproduced error on two machines.

from librarymanager.

cof-tdawson avatar cof-tdawson commented on May 29, 2024

Still broken on Version 15.8.0 Preview 5.0

from librarymanager.

cof-tdawson avatar cof-tdawson commented on May 29, 2024

Still broken on Version 15.9.0 Preview 1.0

image

from librarymanager.

jmcmillen avatar jmcmillen commented on May 29, 2024

I'm having this same issue in Visual Studio 15.8.5 in an ASP.NET Core 2.1 application.
If I remove the Files property, the error goes away and the restore works.

Has anyone found a solution for this?

from librarymanager.

cof-tdawson avatar cof-tdawson commented on May 29, 2024

Still broken with 15.9.0 Preview 3.0 when using the new GUI to create the libman.json file

image

from librarymanager.

jimmylewis avatar jimmylewis commented on May 29, 2024

I haven't been able to repro this on my box (15.9). I've tried using the libman.json contents that @sysdev-cof posted in the original issue with a Web Application project, and also similar to the latest post in a .NET Core 2.1 app. Can you guys think of anything that I might be missing from the repro?

from librarymanager.

cof-tdawson avatar cof-tdawson commented on May 29, 2024

Thanks for looking at this again...

Repro steps for me just now:

Visual Studio 15.9 Preview 3
New Asp.net Core MVC web app
Add >> new npm configuration file
add jquery 3.3.1 to devDependencies in package.json & save
project file >> Manage Client-Side Libraries...
wwwroot > Add Client-Side Library:

image

Click Install

Result:

image

from librarymanager.

jmcmillen avatar jmcmillen commented on May 29, 2024

Yes, thanks for looking at this again.

I just tried with a new install of Windows 10 and Visual Studio 15.8.7. I chose an empty ASP.NET Core 2.1 project and tried to add a specific jquery file from cdnjs. Here's my libman.json file.

{
  "version": "1.0",
  "defaultProvider": "cdnjs",
  "libraries": [
    {
      "library": "[email protected]",
      "destination": "wwwroot/jquery/",
      "files": [
        "jquery.js"
      ]
    }
  ]
}

Restore operation started...
Restoring libraries for project NetCoreLibManTest
Library Manager manifest contains syntax errors. Please fix the errors in libman.json, then try again.
Restore operation completed with errors
Time Elapsed: 00:00:00.0007591

from librarymanager.

cof-tdawson avatar cof-tdawson commented on May 29, 2024

This is fixed for me in today's 15.9.0 Preview 4.0

from librarymanager.

RawsomeGH avatar RawsomeGH commented on May 29, 2024

This still happens for me with NuGet package Microsoft.Web.LibraryManager.Build version 1.0.163 in Visual Studio Professional 2017 version 15.9.3.

Removing the files properties and arrays of all libraries works, but I don't think this is how it's supposed to work.

from librarymanager.

jmcmillen avatar jmcmillen commented on May 29, 2024

I'm just getting back to trying this again and it's fixed for me in Version 15.9.4.

from librarymanager.

jmcmillen avatar jmcmillen commented on May 29, 2024

I spoke too soon. It seems that library restore is only partially working now.

If I specify the jquery files that I want like this.

{
  "version": "1.0",
  "defaultProvider": "cdnjs",
  "libraries": [
    {
      "library": "[email protected]",
      "destination": "wwwroot/jquery/",
      "files": [
        "jquery.js",
        "jquery.min.js",
        "jquery.min.map"
      ]
    }
  ]
}

Then when I right-click on libman.json and choose Restore Client-Side Libraries, the restore works. But I have enabled Restore Client-Side Libraries on Build and when I build, I'm still seeing the error below.

LIB004 Library Manager manifest contains syntax errors. Please fix the errors in libman.json, then try again.

from librarymanager.

cwishva avatar cwishva commented on May 29, 2024

when you enable "Restore Client-Side Libraries on Build" This error can be seen. It's in latest VS Release too 15.9.4.

Should be something to do with Microsoft.Web.LibraryManager.Build Nuget When files are mention the build nuget show's that error.

from librarymanager.

cwishva avatar cwishva commented on May 29, 2024

@justcla are we investigating this ?

Since i'm unable to restore with "Build" package i am suppose to tell every dev to restore manually. Restore fails most of the time with "CDNJS" when some files return 404 , there so we need to mention the required files in order for this to work. Can i say to restore other files if there are 404 ?

eg : https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.js.map (404)

CLI tool works with "Files" i can integrate that to CICD.
If the "Build" package works i don't have to ask to restore manually or use CLI tool.

from librarymanager.

jimmylewis avatar jimmylewis commented on May 29, 2024

I'm still unable to reproduce this at all on either VS15.9.6 and VS16 previews. I've tried using the build package to restore as well as saving the file in VS. Both work just fine for me.

If someone can still repro this, can you specify which version of the Microsoft.Web.LibraryManager.Build package you're using? Or ideally share a project that can reproduce the problem?

from librarymanager.

cofdev25 avatar cofdev25 commented on May 29, 2024

I am not seeing this issue with VS 2019 Version 16.0.0 Preview 2.1 and the following simple project:

image

from librarymanager.

rafsanulhasan avatar rafsanulhasan commented on May 29, 2024

I am still facing this issue with VS 15.9.10 in eShopOnContainers project

from librarymanager.

mark-heptinstall avatar mark-heptinstall commented on May 29, 2024

removing the files property and array avoids the error

This resolved the error for me in VS2022 Version 17.3.5 and Microsoft.Web.LibraryManager.Build 2.1.175

If I add a new library via the UI and select the files option the error occurs from the json it creates.

from librarymanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.