MSBuild NodeJS Path Too Long
23:00In one of my projects which requires the build process to incorperate, however the long path of dependencies in node_modules caused MSBuild failed to build the packages. It's because nodejs deep dependencies have extremely long paths and it caused Windows failed to remove or zip the files accordingly.
Therefore, there is a node package called flatten package which flatten the node_modules folder into single level.
It is fairly simple to do so just add the following code in your build file to have npm install flatten package and run it after build your solution.
Let me know if you have difficulties in handling these.
0 comments