Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

npm run create-bundles and GitHub #6176


User avatar
0
martin created

Last night I downloaded my solution from GitHub and couldn't complete the npm run create-bundles action

[23:16:51] Error: File not found with singular glob: C:/DEVL/Proof of Concept/src/POCDemo.Web.Mvc/node_modules/ion-rangeslider/css/ion.rangeSlider.skinFlat.css (if this was purposeful, use allowEmpty option)

Got back to work and of course the files in question are where it should be.

So GitHub misses some files which I have no problems with. Running yarn doesn't do anything as it thinks everything has already installed.

So apart from copying the solution from my PC and work and taking it home is there another way to get all the files back ?


10 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, you should download your solution from https://aspnetzero.com/

  • User Avatar
    0
    cengiz created

    I downloaded from aspnetzero.com download area, but I got the same error.

    I work for the solution, but I still haven't succeeded.

    I'm getting /ion.rangeSlider.skinFlat.css (if this was purposeful, use allowEmpty option).

    6.4.2

  • User Avatar
    1
    ismcagdas created
    Support Team

    Hi @cengiz, @martin

    • Have you installed packages using yarn or npm ?
    • Are you running the project on a Windows machine or any other OS ?

    Thanks,

  • User Avatar
    0
    BlueBrackets created

    I have the same issue, using npm on a Windows 10 machine. The file 'ion.rangeSlider.skinFlat.css' doesn't exist in the package. By removing it from the bundle-config.json and the package-mapping-config.js it was solved.

  • User Avatar
    0
    martin created

    To reiterate the issue I have is NOT with any of the tools, it is with the fact that Visual Studio/GitHub doesn't keep a copy of the files in node_modules (and maybe some other files as far as I can tell), so when I downloaded a copy from GitHub it was missing some required files.

    In my case I had to take a complete copy of my project home on a USB thumb drive and copy over the project on the other PC. Everything works fine after that.

    I suspect removing some of the file entires from the bundle-config.json and the package-mapping-config.js might not be a good idea. Since some of the missing components would be needed to run the solution correctly.

  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, it's not a good idea to include all the content of node_modules folder into git.

    The reason being node_modules contains all the external library that can be fetched via npm.

  • User Avatar
    0
    martin created

    Thanks for the information, very helpfull as always.

    To sum up :-

    Make sure you have everything installed at https://docs.aspnetzero.com/documents/zero/latest/Getting-Started-Core#prerequirements

    Ensure you follow ALL the steps in https://docs.aspnetzero.com/documents/zero/latest/Getting-Started-Core (pay close attention to https://docs.aspnetzero.com/documents/zero/latest/Getting-Started-Core#configure-the-project)

    Do NOT include the node_modules folder into GitHub (which is why I got the problem)

    If are attempting to copy a project from one PC to another I would suggest getting a FULL copy of the project files. That way if you need to you can copy the missing files (in my case the files in node_modules) you can just replace them. (Which is what I ended up doing)

  • User Avatar
    0
    ukocabicak created

    Hello,

    I tried three times fully deleting the project and run a clean project. I keep getting this error.

    Clean MVC 6.4 version.

    • Prerequirements are checked
    • Executed yarn before opening solution on Visual Studio

    AspNetZero Core MVC: 6.4 yarn: 1.13.0 (current latest) Node: v11.6.0 (current latest) Visual Studio: 15.9.5 (current latest) OS: Windows 10 Pro

    yarn doesn't seem to install ion.rangeSlider.skinFlat.css at all.

  • User Avatar
    0
    aaron created
    Support Team

    Try npm run full-build.

  • User Avatar
    0
    jasong created

    I just ran into the same error message.

    My issue was caused by Visual Studio running the package restore via npm.

    Deleting the node_modules folder and running the restore via yarn in the command line resolved the problem and allowed me to run the copy:node_modules gulp task without errors.