I see that certain versions of node, gulp etc. are incompatible with each other.
How do I know which versions are compatible with which?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI see that certain versions of node, gulp etc. are incompatible with each other.
How do I know which versions are compatible with which?
If you're using Node.js v12+ or higher, you must use Gulp v4+.
If you're using a version of Node.js lower than v12, you must use Gulp v3.
Documentation: Set up your SharePoint Framework development environment
package.json
file in solution.
Sep 29, 2021 at 12:31
Pete,
If you're planning on building a new solution, I'd say that Ganesh's answer is the right one; use the latest version of SPFx and Node + Gulp as per the documentation.
However, if you're trying to work with an older version of an SPFx solution, or if you're testing out a sample from https://aka.ms/spfx-webparts, you may want to refer to the compatibility matrix, which lists which version of SPFx is compatible with which version of Node, Gulp, etc.
The short URL is: https://aka.ms/spfx-matrix
Finally, if you know that you'll need to switch between versions of Node (because, maybe, you're managing multiple solutions with different versions of SPFx), I'd suggest using NVM (I use NVM for Windows).
If you haven't looked into it, I'd recommend attending the Sharing is Caring sessions, which are free sessions covering topics such as configuring your workstation, using NVM, etc.
I hope this helps?