old spfx project fails to bundle on windows server 2019 VM
Hi all,
I hope someone can help as I wasted a lot of time troubleshooting.
I have an old spfx project for on-premise sharepoint.
On my laptop I can bundle it using nodeV8 and gulp CLI version: 2.3.0 Local version: 3.9.1
I have configured a dev VM with windows 2019 and copied over the code, configured the same versions of node and gulp but when I do a bundle it fails on errors that it cannot find files referenced to in css files.
Looking at the errors they make even less sense because the files are there, but it is looking in the wrong folder. instead of “srcassests” it is looking in “srccomponentsassets” (which does not exist).
I can only guess that it is the version of windows (2019) somehow impacting webpack’s translation of the relative paths.
The error message says “Can’t resolve ‘../../assets/icons/app.png'”
but the actual code file says
Hi all,I hope someone can help as I wasted a lot of time troubleshooting.I have an old spfx project for on-premise sharepoint.On my laptop I can bundle it using nodeV8 and gulp CLI version: 2.3.0 Local version: 3.9.1I have configured a dev VM with windows 2019 and copied over the code, configured the same versions of node and gulp but when I do a bundle it fails on errors that it cannot find files referenced to in css files.Looking at the errors they make even less sense because the files are there, but it is looking in the wrong folder. instead of “srcassests” it is looking in “srccomponentsassets” (which does not exist). I can only guess that it is the version of windows (2019) somehow impacting webpack’s translation of the relative paths. The error message says “Can’t resolve ‘../../assets/icons/app.png'”but the actual code file says background-image: url(../../../assets/icons/app.png); so you see it ignores the first “../” why is this happening only on a server VM (I created two VMs from scratch to make sure it is not something I did the first time). Read More