SharePoint / SharePoint/sp-dev-docs

SPFX Error - [trust-cert] CertUtil Error

Open
#9,201 21 comments 0 reactions 2 assignees View on GitHub

@Ashlesha-MSFT is already working on this.

Since Jul 16, 2025.

area:tooling Needs: Attention :wave: Needs: Author Feedback sharepoint-developer-support
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details
  • browser version - Version 116.0.1938.69 (Official build) (64-bit)
  • SPFx version - 1.17.4
  • gulp-cli@2.3.0
  • touch-cli@0.0.1
  • yo@4.3.1
  • Node.js version - v16.13.0
    OS - Win 11 Pro
Describe the bug / error

I have been getting this error after trying to execute gulp trust-dev-cert on a new web part project and haven't been able to fix it, please kindly help. I followed the set up process here https://learn.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment and also tried in my other PC but still throws the same error. I am executing this statement from the webpart solution folder. It does give me the Certificate installation prompt for localhost and after the error is thrown, it creates rushstack-serve.key, rushstack-serve.pem files in .rushstack folder. Here is the error:
image

Thank you.

Steps to reproduce
  1. Install node v16.13.0
  2. install gulp cli, yoeman and sharepoint generator
  3. Create webpart with the generator scaffolding
  4. Run gulp trust-dev-cert
Expected behavior

certificate successfully installed and running gulp serve would bring up the workspace

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.