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,
And come to trusting the dev certificate by running
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 [13:14:02] 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.