s-KaiNet / spfx-fast-serve

Improve your SharePoint Framework development flow by speeding up the "serve" command :rocket:
MIT License
135 stars 11 forks source link

spfx-fast-serve not working / cant find dist/*Strings_en-us.js and dist/*-application-customizer.js #62

Closed Saintenr closed 2 years ago

Saintenr commented 2 years ago

Hi,

i tried to get fast serve to work, but if i try to load the browser it says error 404 for dist/Strings_en-us.js and dist/-application-customizer.js ...

at normal gulp serve there are 4 files at the /dist/* folder. When i run with npm run serve there is only one file: 47b64c37-dcb2-4508-9745-e5c960fa83a8.manifest.json

Bildschirmfoto 2022-02-18 um 11 29 45

i am using spfx 1.13.1 , spfx-fast-serve@3.0.3 and "spfx-fast-serve-helpers": "~1.13.0"

s-KaiNet commented 2 years ago

Hi, could you create a reproducible repo? fast-serve works with app customizer, I use it for my project. Most likely you have a kind of unusual setup or you haven't applied webpack modifications.

Saintenr commented 2 years ago

Hi, what files do you need at this repo? i am working with another team member. HE uses windows and there also only the one file is created and with him it works. I use Mac OS maybe it is also because of that? Because we use the same repo

s-KaiNet commented 2 years ago

So on windows it works just fine, but not on Mac OS, is it right? In this case I will check how it performs on Mac. Only one file should be created inside /dist, so that's perfectly fine (webpack serves all files from memory).

Saintenr commented 2 years ago

on serve process i see the 3 files for a few seconds before the disappear. So i tried to copy them from the normal gulp serve process and add them after npm run serve to the /dist folder the app starts without an error.

but i am not fam. with the serve process so it was just an idea, because it says these files are missing Bildschirmfoto 2022-02-18 um 12 33 25

s-KaiNet commented 2 years ago

Could you scaffold a new SPFx project with just one web part and fast-serve? Does it work for you?

Saintenr commented 2 years ago

i just created a new app customizer on 1.14 and this is working, some how. So i have to search the difference and i wonder why its working on windows with the same project.

Saintenr commented 2 years ago

i just copied my project to a new empty spfx project and now it is working. thanks for your support.

s-KaiNet commented 2 years ago

Yeah, that's strange, but it looked like a kind of configuration issue from the begging. In such cases you could also try removing completely node_modules and package-lock.json and reinstalling all dependencies, it might help as well.

AndreiYefimau commented 1 year ago

I've faced the same issue, after investigation found that empty space in repository name was escaped to %20 in file system, server un-escaped this to empty space but this path cannot be resolved. Re-name repository helped