I'm setting up a development environment for SP2019.

I've installed as per the development stack recommended within the guidance material and roadmap page for SPFx 1.12.1 https://docs.microsoft.com/en-us/sharepoint/dev/spfx/release-1.12.1

  • Node.js 14.15.0
  • gulp CLI 2.3.0 and Local 4.0.2
  • yeoman 4.3.0
  • @microsoft/generator-sharepoint 1.12.1

Once I've started my new project by running,

yo @microsoft/sharepoint

And come to trusting the dev certificate by running

gulp trust-dev-cert

followed by

npm install
gulp serve

I'm getting an error that is causing gulp serve to fail.

Build target: DEBUG
[13:11:48] Using gulpfile U:\SPFx\gulpfile.js
[13:11:48] Starting 'serve'...
[13:11:49] Starting gulp
[13:11:49] Starting subtask 'configure-sp-build-rig'...
[13:11:50] Finished subtask 'configure-sp-build-rig' after 475 ms
[13:11:50] Starting subtask 'spfx-serve'...
Starting api server on port 5432.
Registring api: /getwebparts
Registring api: /*.*
Registring api: /workbench
[13:14:02] Error - [spfx-serve] Error: Invalid glob argument:
[13:14:02] Error - 'spfx-serve' sub task errored after 2.18 min
 Invalid glob argument:
[13:14:02] 'serve' errored after 2.22 min
About to exit with code: 1
Process terminated before summary could be written, possible error in async code not continuing!
Trying to exit with exit code 1

Common advice on this board to resolve that error is to downgrade to gulp 3.9.1.

I can't do that for two reasons, I experience another error caused by my gulp version being less than 4. gulp trust-dev-cert gives the error: ReferenceError: primordials is not defined

I also need according to the roadmap page gulp v4 to be part of the stack to support SPFx 1.12.1 to develop for SharePoint 2019 and above.

How do I resolve this, I seem to be stuck between a rock and a hard place.

2 Answers 2


SharePoint Server 2019 supports SharePoint Framework client-side web parts hosted on classic or modern SharePoint pages built by using the SharePoint Framework v1.4.1.

SharePoint Server 2019 also supports SharePoint Framework extensions hosted on modern SharePoint pages built using SharePoint Framework v1.4.1. This means that when you're targeting the SharePoint Server 2019 platform, you need to use the SharePoint Framework v1.4.1 because of the server-side version dependencies.

Source - Microsoft Docs: SP 2019 - Which version of the SharePoint Framework to use

Also check the SPFx version compatibility matrix at: SharePoint Framework development tools and libraries compatibility


I changed the version of gulp from 4.0.2 to 3.9.1 and the problem was solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.