-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostCSS error using Fast Serve 1.20.0 on new SPFx 1.20.0 project #150
Comments
This is interesting... I removed There's a reference in it to
|
Yeah, I also had problems with postcss error immediately after trying 1.20 version of fast-serve. You'r correct, that if you run clean install (after removing node_modules and package-lock.json) it works. For some reason, postcss-loder plugin grabs deduped postcss 7.x version, but should use 8.x instead. I'm trying to figure out how to fix it. For the second problem there is a related bug #144 , but I have troubles reproducing it, seems some specific dependencies trigger it. However the root cause seems the same - a mess of dependent packages with different versions, where I cannot control this "dedupe" process. To fix the second problem, most likely you should just intall Meanwhile, I'm searching for a more solid way of solving these problems. |
Could you send me the package.json and package-lock.json from your main project, where you have this "schema_utils_1.validate" error? |
I did not have this issue with 1.19.0 but ever since I upgraded to SPFx 1.20.0 (maybe a coincidence) strange things have been happening to my code. I was the person who created the ticket the other day and upgraded SPFx too early before the fast serve version was released. When I downgraded to 1.19.0 I got a ton of errors. Usually I delete node_modules, run npm install, and npm dedupe but even that didn't work. I couldn't get fast serve to work on 1.19 even though it was working fine the day before. I decided to go back to SPFx 1.20 and use gulp serve (which is terrible for large projects lol) until the new fast serve was released. It's possible I was also getting the scss errors on 1.19. If I have time today I'll downgrade to 1.19 on both and see if it's the same issue as the other ticket. |
Which error do you have? This "schema_utils_1.validate) is not a function" or something else? |
I downgraded to 1.19 and got the same error above as I got with 1.20 so it looks like it's the same as the other ticket and not related to 1.20. I did not have this issue with 1.19 until now. Something I did with my project triggered this error and now I get it for both versions. These are the steps I took when downgrading
Here is the output starting at npm install and my 2 files using 1.19 package.json
|
Does |
I just installed it and I no longer get errors. I tested a few web parts and everything seems to be working. I will upgrade to 1.20 and see if that works now. |
I had a little trouble with 1.20 but got it to work. I still had I ran
|
Thank you for all the info you posted, it will help to fix the issue properly. |
As of now, while I'm trying to fix it, seems the workaround would be |
I uninstalled postcss like I did with the new project and everything still works in 1.20 in my main project. I was curious if I deleted node_modules and reinstalled if it would still work and it did not. A fresh install on a new project and existing project shows the "upgrade/install postcss" error but then removing it doesn't show the error again. I also ran |
@kbeeveer46 FYI I have published |
You should also delete package-lock.json, have you done it? |
Also, the errors on your screen are from regular |
Sorry, I should have tested your change on a new project. I think there's something funky going on with my main project that requires PostCSS (apparently, I can't run gulp serve or npm run serve without PostCSS installed). I tested Fast Serve 1.20.0 on a new project (which throws the error) and 1.20.1 and the new version fixes the issue. |
The issue with |
EDIT: Added updates in second comment
Created a new SPFx 1.20.0 React webpart using
yo @microsoft/sharepoint
and ranspfx-fast-serve
to initialize it in the project.Error:
PostCSS plugin autoprefixer requires PostCSS 8
I assume it's fast serve related since
gulp serve
works fine? The error went away when I addedpostcss
as a dev dependencyOutput and package.json below
Output
package.json (default that comes with SPFx React webpart + fast serve)
The text was updated successfully, but these errors were encountered: