Closed gregor-tusar-sowa closed 3 days ago
Hi there @gregor-tusar-sowa!
Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.
We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.
Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:
Hello, and thanks for reporting this.
We are planning to shorten the paths, but it is challenging to get under the abstract path length of 260 characters in Windows. Up until now, we have only seen the problem with regards to the Backoffice files in the Umbraco StaticAssets RCL. What I do not fully grasp here is why Visual Studio (I presume) is copying "node_modules" to your "bin/debug" folder. That is certainly not needed to build an extension for Umbraco.
There is a similar situation described here, where an Angular project exceeded the file length of Windows and a proposed solution to ignore the node_modules folder. I think that could work for your situation, would you be willing to try it out?
I managed to solve this issue with updating the MSBuild version to 17.10. The issue was that Visual Studio took MSBuild version 16, which failed to copy long file paths. After changing the path to the MSBuild in environmental variables to the newest MSBuild the build went through smoothly.
Oh, good to know @gregor-tusar-sowa! Just be aware that you don't need to have node_modules in your output folder for this to work, so you can save a few bytes by excluding it.
Thanks for letting me know that.
Adding this ItemGroup
to my project does not exclude the node_modules
folder to being copied to output and I don't know why.
<ItemGroup>
<Content Remove="App_Plugins\**\node_modules\**" />
<Compile Remove="App_Plugins\**\node_modules\**" />
<EmbeddedResource Remove="App_Plugins\**\node_modules\**" />
<None Remove="App_Plugins\**\node_modules\**" />
</ItemGroup>
@gregor-tusar-sowa I am still looking into this to see, how you could exclude node_modules
and other unwanted files. It looks like the Umbraco.Cms.Targets overrule whatever you try to do since it will copy App_Plugins blindly following this:
I recommend putting the node_modules
and other source files outside of App_Plugins, perhaps in a Client folder, or even better in an RCL, where you get a wwwroot
folder, which you can copy the compiled files to.
I realise that our documentation does not state this, so that is something we are going to look into getting added!
Thanks for looking into this. We will try to move things around a bit.
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
14.0.0
Bug summary
While updating custom dashboard from v13 to v14 we stumbled upon an issue that is caused by Umbraco
@umbraco-cms/backoffice
package.While trying to build the solution a lot of paths exceed the OS limit of 260.
Shortening some of our names did not help, because after that copying to output directory fails.
The paths of some of the
node_modules
files itself is 185 char long, so adding drive letter, some folders to solution and build output folderbin\Debug\net8.0\
quickly exceeds OS max limit.Specifics
No response
Steps to reproduce
C:\src\ORG\MyComp\src\Cms\Company.Cms
.App_Plugins
with the new approachExpected result / actual result
We expect the solution would successfully build.
ACTUAL RESULT: