s-KaiNet/spfx-fast-serve

No matching version found for spfx-fast-serve-helpers@~1.20.0.

davestain opened this issue · 12 comments

I've been trying to make this work but there's no version available to install newer than1.18.13 and since I'm using most recent version npm install fails while trying to bring a version of spfx-fast-serve-helpers that does not exists.
image

image

Same issue for me as well.

Same issue with version 1.19.0

Any workaround other then removing the fast-serve?

spfx-fast-serve 4.0.0 needs fast-serve-helper 1.20
spfx-fast-serve 4.0.1 needs fast-serve-helper 1.19

None of fast-serve-helper versions exist, but we can get the 19 beta version.

Workaround:
npm install spfx-fast-serve -g
spfx-fast-serve

Wait for the error.

Change the package.json to the beta version
"spfx-fast-serve-helpers": "~1.19.0-beta.12",

npm install

Thanks @Dangerous-Mind, let me try that work around. I'll keep you posted.

It looks like we still have some bugs on the 1.19.0-beta.12 version.

Some elements lose the class when rendering.
Gulp serve works fine.

The case I detected was the first class inside a modal.

It's probably better to roll back to V3.x

I rollback all the sp/spfx related libraries to version 1.18.0. Now fast-serve is working.

Bug on 1.19.0-beta.12 Workaround

Apparently fast-serve doesn't like css classes with some caps letters joined together and renames them somehow.

My class was named .projectABCForm which wasn't appearing on the browser.
While debugging after saving some changes on the scss notated he created the css class with .projectAbcForm.

Renamed all join caps css naming and it's working fine.

Version 1.19.0 of fast-serve was released. Now you can use it with SPFx 1.19. Please note, that underlying version of webpack was changed, as well as some internal implementations, so there might be bugs.

spfx-fast-serve 4.0.0 needs fast-serve-helper 1.20
spfx-fast-serve 4.0.1 needs fast-serve-helper 1.19

it's not true, fast-serve-helper always match SPFx version, as noted in the readme. If you SPFx version is bigger than 1.17, you should always install the latest spfx-fast-serve.

Apparently fast-serve doesn't like css classes with some caps letters joined together and renames them somehow.

fast-serve doesn't always follow the exact class names you give, but in development mode it's not critical. What is important, is that the styles are consistent and match what you write in your scss files.

I'm closing this as completed, if you have any further problems, please fire a new issue.

Great thanks @s-KaiNet

You right. I read the code afterwards. It was checking "sp-build-web" version that is 1.20 on SPFx 1.19.
Also the code was on the helper part not on the server part.
Sorry for the mistake

On the CSS issue.
The class disappears from the displayed component. So, the section doesn't have any class.

VSCode
image

Browser Edge
image

Should I open a new ticket?

@Dangerous-Mind classes should not disappear. But I think I figured it out, what's happening. I created a new issue #140 , if have anything to add, please use new issue I created.

When it comes to SPFx versions check, then previously I checked @microsoft/sp-build-web dependency like you correctly mentioned. But with SPFx 1.19 MSFT decoupled build libraries from SPFx version and now we have sp-build-web version 1.20 for SPFx 1.19 in package.json. Thus now I have to check the version of @microsoft/sp-core-library in package.json instead.