Replies: 4 comments 2 replies
-
@flowerbot - I'm really sorry for all the challenges you're experiencing. |
Beta Was this translation helpful? Give feedback.
-
@flowerbot Thanks for bringing this to our attention. I will attempt to replicate it to better understand what you are experiencing. As Alex (@AJIXuMuK) stated, Microsoft does not build the Docker images. Those are done by the Microsoft 365 Platform Community (PnP). I will tag a couple of people that work with those images, as they may have more insight. @hugoabernier @waldekmastykarz |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response and comments. @AJIXuMuK ,I wrote my story here about my experience so far with spFx Docker images because this is where the Docker image page for spFx directed me. As to nvm, have used that in the past but in a docker container, nvm should be unnecessary? nvm would be more relevant if I was developing on my local machine, but I haven't tried to work with spFx on my local machine since I discovered Docker, because the idea of developing inside a Docker container looked so much like 'the answer' to the usual avalanche of spFx incompatibility issues, that I'm determined to get spFx docker images working as expected and I would hope someone at MS is too. A non-docker question for you as follow-up though, does the current (1.14) version of spFx reload changes while developing? Because the version in the docker image doesn't. @hugoabernier your PnP webpart sample works, all of the other ones I've tried mostly work too. If there are minor incompatibilities, they have so far been easily fixed. I built my first Dockerised web part by using a copy of yours as a starting point: with that container, the 'reload' function works, sort of - had to refresh my pages with cache disabled multiple times to see changes, not wonderful, but tolerable. Its the current Docker images for spFx (1.10-1.14) that don't work for me. The 1.14 image doesn't load changes, and with the 1.10/11 images, gulp is broken. @DonKirkham Without your guide I would not have gotten to this point. Any light you can bring to help me solve my current problem will also be greatly appreciated. I hope I can find a way through, still haven't though. There were more differences than just package versions between the functioning v1.10 PnP sample and the the current non-functioning v 1.10 image. I then went to trying figure out how to global install anything in a container from an spFx Docker image. There's no 'root user', and no other user I can find authorised as such, and the spfx user ('spfx') which (I think) did the initial install from Docker isn't authorised to now global install anything extra (eg to fix the gulp issue). I've read that node installs packages as some other user who is later not authorised by Docker, but I don't fully understand that yet. I admit my Docker and Linux knowledge is very low at present, and I'm running through a 3 hour video Docker tutorial to see if there's anything in there that will help me - eg can I build my own spFx image from scratch with all the stuff I want, including globally installed things like the version of Gulp that's going to work with the version of spFx I want to use. I'm sure its possible but can "I" do it? I'd rather not, and was thinking the pre-made Docker images would mean I didn't have to. Part-way through my crash course in Docker, I'm thinking I might go take a peak at the spFx image Dockerfile and see how much I understand/can fix to make my own now .. ok can't do that :P And so it goes. But really I just want to get back to my project. At this stage I'd happily use a proven PnP sample and convert that to my project, if only it was easier to rename things .... Again, appreciate all your responses so far. |
Beta Was this translation helpful? Give feedback.
-
I am not 100% sure what issue we are trying to address, so let me tackle what I see and try to explain some of the "quirks" with Docker images:
Bottom line is that Docker can be useful in many cases, but it has it's limits. If I am still missing the issue you are trying to raise, please let me know and we'll work through it! PS. I am very excited to know someone read my blog and used information in it!! |
Beta Was this translation helpful? Give feedback.
-
Let me tell you a story.
I started a new spFx project in docker following directions here: https://www.donkirkham.com/blog/spfx-docker. Excellent and simple for me, since I'm new to docker. I followed the directions for v 1.14, certificate is nicely generated automatically, I download and trust it from its easy to find location, and everything worked beautifully EXCEPT the changes I was making weren't being served. I could only see them by killing the server and doing another 'gulp serve'. Dr Google had no useful help for me, I don't know how to fix it to make it work and don't want to waste time down that rabbit hole ....
So I thought ok, I know reload works in earlier versions (had played around with PnP samples which were all using version 1.10), so I'll try a docker image for an earlier version of spFx. Set it all up the same way, starting with the scaffold for v 1.10, EXCEPT gulp version in the scaffold is the latest version of gulp which is apparently incompatible with earlier spFx versions, and incompatible with the container image. Has the (unnecessary and code-breaking?) update to the scaffold package list for old versions ever been tested with the docker image? I think not.
Sure enough when I go back to compare to my functioning v 1.10 PnP sample, its using an earlier version, so I go to look for information on incompatibilities, and I discover there are significant breaking changes between version 3* and 4* of gulp, and I've got to ask, is anyone on the team even aware of this problem? Why would gulp be updated in older versions of the scaffold without appropriate code changes to make it function correctly? Why would gulp be updated in the latest version without appropriate code changes to make it function correctly? In the docker-world at least, spFx doesn't seem to work as required according to the scaffold now, for any version. At least not from v 1.10 onwards.
I think what I'm going to do next is try another v 1.10 container, but use the package list from a PnP sample, so I should get the correct gulp version. Wish me luck.
Beta Was this translation helpful? Give feedback.
All reactions