Base solution for your next web application
Open Closed

Bundling issue with latest asp.net core and jQuery #8917


User avatar
0
razkhan78 created

We have downloade aspnetzero latest asp.net MVC and jQuery yesterday and getting this error.

We found some solutions like run yarn and then np build run commands we have installed yarn and node. Unable to run command in VS2019, tried in directory but still error.

Is there any specific command to generate _bundles folder?


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @razkhan78,

    I just tried with AspNet Zero 8.6 and it worked for me. This sometimes happens if yarn can't download packages.

    Can oyu try again running "yarn" and then "npm run create-bundles" commands in the root directory of MVC project ?

    Thanks,

  • User Avatar
    0
    razkhan78 created

    We finally found these steps to be followed to get project working:

    1. Download and install node.js & yarn

    2)On command prompt npm install yarn npm install gulp

    3)After installation completes open command prompt from Web.Mvc folder first run npm run create-bundles command.

    This command for the development purpose it replaces js file with min.js file and creates minified file butnot actually minify the js file in the development process. It will create bundles in the "wwwroot\view-resources\Areas\App\Views_Bundles" path.

    In case it gives error run yarn and then run npm run create-bundles

    But we would like to know is there any way in local machine we can use normal file instead of min. As "npm run create-bundles" is too slow even on second run.

  • User Avatar
    0
    maliming created
    Support Team

    hi

    But we would like to know is there any way in local machine we can use normal file instead of min.

    This is by design, the create-bundles command monitors file changes, so you don't need to stop it and run it again.