s-KaiNet / spfx-fast-serve

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

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

Closed davestain closed 2 weeks ago

davestain commented 4 weeks ago

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
omiq17 commented 3 weeks ago

Same issue for me as well.

ZzyzxIsAlreadyTaken commented 3 weeks ago

Same issue with version 1.19.0

Dangerous-Mind commented 3 weeks ago

Any workaround other then removing the fast-serve?

Dangerous-Mind commented 3 weeks ago

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

davestain commented 3 weeks ago

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

Dangerous-Mind commented 3 weeks ago

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

omiq17 commented 3 weeks ago

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

Dangerous-Mind commented 3 weeks ago

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.

s-KaiNet commented 2 weeks ago

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.

s-KaiNet commented 2 weeks ago

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

Dangerous-Mind commented 2 weeks ago

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?

s-KaiNet commented 2 weeks ago

@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.