Base solution for your next web application
Open Closed

V7 Upgrade - Bundles error on NPM command #7320


User avatar
0
exlnt created

I just completed the V7 upgrade (Asp.Net Core Mvc/Jquery) and Metronic 6 UI changes to my solution on my "Development.upgrade" branch. I have just completed my pull request merge to my "Development.master" branch. I am able to compile the solution without any errors. I am able to run the application.
However, when I run the "npm run create-bundles" cmd on the MVC folder, I get multiple errors like the examples below.

 ERROR in ./wwwroot/view-resources/Areas/MyApp/Views/_Bundles/vendors.bundle.css (./node_modules/css-loader/dist/cjs.js!./wwwroot/view-resources/Areas/MyApp/Views/_Bundles/vendors.bundle.css)
    Module not found: Error: Can't resolve '../../../../../metronic/src/vendors/metronic/fonts/Metronic_fda1334c35d0f5fe2afb3afebbb6774a.woff2' in '\GIT\ABP\ABPMyApp.Development\src\EXLNT.MyApp.Web.Mvc\wwwroot\view-resources\Areas\MyApp\Views\_Bundles'
     @ ./wwwroot/view-resources/Areas/MyApp/Views/_Bundles/vendors.bundle.css (./node_modules/css-loader/dist/cjs.js!./wwwroot/view-resources/Areas/MyApp/Views/_Bundles/vendors.bundle.css) 48:42-151
     
    ERROR in ./wwwroot/view-resources/Areas/MyApp/Views/_Bundles/vendors.bundle.css (./node_modules/css-loader/dist/cjs.js!./wwwroot/view-resources/Areas/MyApp/Views/_Bundles/vendors.bundle.css)
    Module not found: Error: Can't resolve '../../../../../metronic/src/vendors/fontawesome5/webfonts/fa-solid-900.woff2' in '\GIT\ABP\ABPMyApp.Development\src\EXLNT.MyApp.Web.Mvc\wwwroot\view-resources\Areas\MyApp\Views\_Bundles'
     @ ./wwwroot/view-resources/Areas/MyApp/Views/_Bundles/vendors.bundle.css (./node_modules/css-loader/dist/cjs.js!./wwwroot/view-resources/Areas/MyApp/Views/_Bundles/vendors.bundle.css) 31:42-129     

Almost all of the errors shown in the console are for the vendors.bundle files.

Here are the steps I followed after I updated my desktop copy.

  1. Ran YARN cmd in the .Mvc project directory.
  2. Opened solution in VS and built the solution.
  3. Ran "npm run create-bundles" in the .Mvc project directory.
  4. Deleted "node_modules" folder from .Mvc directory.
  5. Ran "npm run create-bundles" in the .Mvc project directory.

I did NOT face any of these errors on my "Development.Upgrade" branch. If someone can point in the right direction on how to resolve these errors and/or let me know what I am missing?


1 Answer(s)
  • User Avatar
    0
    exlnt created

    I cloned my repo into a new directory and the issue went away. Not sure why but my issues is resolved now.