Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building solution with --runtime fails with error LIB003 #489

Open
rlaveycal opened this issue Jun 11, 2019 · 7 comments
Open

Building solution with --runtime fails with error LIB003 #489

rlaveycal opened this issue Jun 11, 2019 · 7 comments
Labels

Comments

@rlaveycal
Copy link

Functional impact

Build fails in CI server

Minimal repro steps

I have a build pipeline that runs each step in the nano sdk container on Windows 2019 (microsoft/dotnet:2.2.103-sdk-nanoserver-1809). The source code folder is mapped into the container as a volume.

My solution contains a web project, a couple of support projects and a couple of test projects that depend on the web project

  1. dotnet restore my.sln --configuration release --runtime win-x64
  2. dotnet build my.sln --configuration release --runtime win-x64 --no-restore

Step 2 fails with multiple instances of error LIB003, each for a different file. The files in question are present

libman.json : error LIB003: css/bootstrap-grid.min.css.map could not be written to disk. Make sure the file name is correct

Expected result

The build would work

Further technical details

  • Running a LibMan CLI step before the build to restore the packages doesn't solve the issue
  • Removing the --runtime win-x64 option works.
  • Doing the build on the web project works.

My guess is that there's a race condition between concurrent downloads of the packages caused by builds of the test projects. When --runtime is specified the output shows 2 instances of

  Restoring library twitter-bootstrap@4.3.1...
  Restoring library jquery@3.3.1...
  Restoring library jquery-validate@1.19.0...
  Restoring library jquery-validation-unobtrusive@3.2.11...
  Restoring library popper.js@1.14.7...

  5 libraries restored in 0.18 seconds

whereas without it only 1 restore is done.

@jimmylewis jimmylewis added the P2 label Jun 24, 2019
@Nimatora
Copy link

Same issue on v2.1.76. Is there any workaround?

@Jetski5822
Copy link

I am having a similar issue; I dont have the runtime options, but the project does have them in the proj like this ;

<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>

I get this error; pretty consistently

libman.json : error LIB003: highstock.src.js could not be written to disk. Make sure the file name is correct 

on version 2.1.161, but had it on earlier versions too.

@AlexanderSchulz-Siemens
Copy link
Contributor

We are experiencing this sporadically as well. Is there any update?

@cidthecoatrack
Copy link

I would also like to tack onto this issue. I am seeing it while restoring a net6.0 asp.net web app in a docker container.

It's important to note that while the web app doesn't have multiple runtimes, and I wasn't using the CLI options to specify one, the app did use some legacy packages in .Net Framework. I had been using the dotnet core docker image as my build, so I tried using a framework image instead to see if that helped - and it did! So for anyone stuck on this, I might recommend trying a Framework container and see if it helps, especially if you have legacy/old Nuget packages that run in Framework (even if your web app is dotnet core)

@Hoai-Phong
Copy link

Hoai-Phong commented Sep 13, 2023

I still have the same error, I have tried a few ways to fix it but it's still unclear, when I open the project it crashes
I did clean a few times and it disappeared.

image

@jimmylewis
Copy link
Contributor

@Hoai-Phong can you share the libman.json snippet for that library so I can try to reproduce the issue?

@Hoai-Phong
Copy link

@jimmylewis
Send you
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": [
{
"library": "jquery@3.7.1",
"destination": "wwwroot/lib/jquery/",
"files": [
"jquery.min.js",
"jquery.js"
]
},
{
"provider": "cdnjs",
"library": "bootstrap@5.3.1",
"destination": "wwwroot/lib/bootstrap/",
"files": [
"js/bootstrap.min.js",
"js/bootstrap.js"
]
},
{
"provider": "unpkg",
"library": "datatables.net-bs5@1.13.6",
"destination": "wwwroot/lib/datatables.net-bs5/",
"files": [
"css/dataTables.bootstrap5.css",
"css/dataTables.bootstrap5.min.css",
"js/dataTables.bootstrap5.js",
"js/dataTables.bootstrap5.min.js"
]
},

{
  "provider": "unpkg",
  "library": "datatables.net-buttons-bs5@2.4.1",
  "destination": "wwwroot/lib/datatables.net-buttons-bs5/",
  "files": [
    "css/buttons.bootstrap5.css",
    "css/buttons.bootstrap5.min.css",
    "js/buttons.bootstrap5.js",
    "js/buttons.bootstrap5.min.js",
    "js/buttons.bootstrap5.mjs"

  ]
},
{
  "provider": "unpkg",
  "library": "datatables.net-responsive-bs5@2.5.0",
  "destination": "wwwroot/lib/datatables.net-responsive-bs5/",
  "files": [
    "css/responsive.bootstrap5.css",
    "css/responsive.bootstrap5.min.css",
    "js/responsive.bootstrap5.js",
    "js/responsive.bootstrap5.min.js",
    "js/responsive.bootstrap5.mjs"

  ]
},
{
  "library": "datatables-responsive@2.5.0",
  "destination": "wwwroot/lib/datatables-responsive/"
},
{
  "library": "datatables.net-select@1.7.0",
  "destination": "wwwroot/lib/datatables.net-select/",
  "files": [
    "dataTables.select.js"
  ]
},
{
  "library": "jquery-timepicker@1.14.1",
  "destination": "wwwroot/lib/jquery-timepicker/"
},
{
  "library": "moment.js@2.29.4",
  "destination": "wwwroot/lib/moment.js/"
},

{
  "provider": "cdnjs",
  "library": "i18next@23.4.6",
  "destination": "wwwroot/lib/i18next/",
  "files": [
    "i18next.min.js",
    "i18next.js"
  ]
},
{
  "provider": "cdnjs",
  "library": "select2@4.0.13",
  "destination": "wwwroot/lib/select2/",
  "files": [
    "js/select2.min.js",
    "js/select2.js"
  ]
},
{
  "provider": "unpkg",
  "library": "jquery-datatables-checkboxes@1.2.14",
  "destination": "wwwroot/lib/jquery-datatables-checkboxes/",
  "files": [
    "css/dataTables.checkboxes.css",
    "js/dataTables.checkboxes.js",
    "js/dataTables.checkboxes.min.js"
  ]
},
{
  "provider": "cdnjs",
  "library": "select2@4.0.13",
  "destination": "wwwroot/lib/select2/"
},
{
  "provider": "cdnjs",
  "library": "flatpickr@4.6.13",
  "destination": "wwwroot/lib/flatpickr/"
},
{
  "provider": "unpkg",
  "library": "datatables.net@1.13.6",
  "destination": "wwwroot/lib/datatables.net/",
  "files": [
    "js/jquery.dataTables.js",
    "js/jquery.dataTables.min.js"
  ]
},

{
  "provider": "cdnjs",
  "library": "datatables-buttons@2.4.2",
  "destination": "wwwroot/lib/datatables-buttons/",
  "files": [
    "js/dataTables.buttons.min.js",
    "js/dataTables.buttons.js",
    "js/buttons.print.mjs",
    "js/buttons.print.min.mjs",
    "js/buttons.print.min.js",
    "js/buttons.print.js",
    "js/buttons.html5.mjs",
    "js/buttons.html5.min.mjs",
    "js/buttons.html5.min.js",
    "js/buttons.html5.js"
  ]
},

{
  "provider": "cdnjs",
  "library": "sweetalert2@11.7.27",
  "destination": "wwwroot/lib/sweetalert2/"
},
{
  "provider": "cdnjs",
  "library": "datatables.net-scroller-bs5@2.2.0",
  "destination": "wwwroot/lib/datatables.net-scroller-bs5/",
  "files": [
    "scroller.bootstrap5.min.js",
    "scroller.bootstrap5.css",
    "scroller.bootstrap5.js",
    "scroller.bootstrap5.min.css"
  ]
},
{
  "provider": "unpkg",
  "library": "@ckeditor/ckeditor5-alignment@39.0.1",
  "destination": "wwwroot/lib/ckeditor/ckeditor5-alignment/",
  "files": [
    "src/alignment.js",
    "build/alignment.js",
    "build/translations/ja.js"
  ]
},
{
  "provider": "unpkg",
  "library": "@ckeditor/ckeditor5-alignment@39.0.1",
  "destination": "wwwroot/lib/ckeditor/ckeditor5-alignment/",
  "files": [
    "src/alignment.js",
    "build/alignment.js",
    "build/translations/ja.js"
  ]
},

{
  "provider": "unpkg",
  "library": "@ckeditor/ckeditor5-basic-styles@39.0.1",
  "destination": "wwwroot/lib/ckeditor/ckeditor5-basic-styles/",
  "files": [
    "build/basic-styles.js",
    "build/translations/ja.js"
  ]
},
{
  "provider": "unpkg",
  "library": "@ckeditor/ckeditor5-editor-classic@39.0.1",
  "destination": "wwwroot/lib/ckeditor/ckeditor5-editor-classic/",
  "files": [
    "build/editor-classic.js"
  ]
},
{
  "provider": "unpkg",
  "library": "ckeditor5@39.0.1",
  "destination": "wwwroot/lib/ckeditor5/",
  "files": [
    "build/ckeditor5-dll.js",
    "build/translations/ja.js"
  ]
},
{
  "provider": "unpkg",
  "library": "@ckeditor/ckeditor5-font@39.0.1",
  "destination": "wwwroot/lib/ckeditor/ckeditor5-font/",
  "files": [
    "build/font.js",
    "build/translations/ja.js"
  ]
},
{
  "provider": "unpkg",
  "library": "@ckeditor/ckeditor5-link@39.0.1",
  "destination": "wwwroot/lib/ckeditor/ckeditor5-link/",
  "files": [
    "build/link.js",
    "build/translations/ja.js"
  ]
},
{
  "provider": "unpkg",
  "library": "@ckeditor/ckeditor5-style@39.0.1",
  "destination": "wwwroot/lib/ckeditor/ckeditor5-style/",
  "files": [
    "build/style.js",
    "build/translations/ja.js"
  ]
}

,
{
"provider": "unpkg",
"library": "@ckeditor/ckeditor5-build-classic@39.0.1",
"destination": "wwwroot/lib/ckeditor/ckeditor5-build-classic/",
"files": [
"build/ckeditor.js",
"build/translations/ja.js"
]
}
,
{
"provider": "unpkg",
"library": "@ckeditor/ckeditor5-heading@39.0.1",
"destination": "wwwroot/lib/ckeditor/ckeditor5-heading/",
"files": [
"build/heading.js",
"build/translations/ja.js"
]
}
,
{
"provider": "unpkg",
"library": "@ckeditor/ckeditor5-block-quote@39.0.2",
"destination": "wwwroot/lib/ckeditor/ckeditor5-block-quote/",
"files": [
"build/block-quote.js",
"build/translations/ja.js"
]
}
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants