I stumbled over an issues with Ionic 4 and the cordova build. In debug mode, the js module filenames are getting, depending on your project setup, quiet big. In Prod releases, they get uglified. So there will be less of a problem.
C:\develop\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(3704,5): error MSB3021: Unable to copy file "C:\swarm\workspace\very-long-directory-path\platforms\windows\www\default~features-path-to-module-file-and-module-name~c9a3cc5b.js" to "build\windows\bld\PackageLayout\www\default~path-to-module-file-and-module-name~c9a3cc5b.js". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. [C:\swarm\workspace\very-long-directory-path\platforms\windows\CordovaApp.Windows10.jsproj]
So to fix that, we addressed the issue with the long dir name. My Jenkins generates the dir automatically and uses the last git hash with about 50 characters. We removed that, and were under that Windows limit.
So I guess, this is more or less a workaround for the problem itself. I'm not really sure how Windows long path thing works, but here is a link to the official docu. Maybe this could help to eliminate any error in that direction.
Hello there,
I stumbled over an issues with Ionic 4 and the cordova build. In debug mode, the js module filenames are getting, depending on your project setup, quiet big. In Prod releases, they get uglified. So there will be less of a problem.
C:\develop\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(3704,5): error MSB3021: Unable to copy file "C:\swarm\workspace\very-long-directory-path\platforms\windows\www\default~features-path-to-module-file-and-module-name~c9a3cc5b.js" to "build\windows\bld\PackageLayout\www\default~path-to-module-file-and-module-name~c9a3cc5b.js". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. [C:\swarm\workspace\very-long-directory-path\platforms\windows\CordovaApp.Windows10.jsproj]
So to fix that, we addressed the issue with the long dir name. My Jenkins generates the dir automatically and uses the last git hash with about 50 characters. We removed that, and were under that Windows limit.
So I guess, this is more or less a workaround for the problem itself. I'm not really sure how Windows long path thing works, but here is a link to the official docu. Maybe this could help to eliminate any error in that direction.
Best regards, Fabiryn