I am getting following error after running 'gulp trust-dev' in SPFx:

PS C:\Users\s.framework\Code\ZEN> gulp trust-dev-cert
Build target: DEBUG
[15:11:11] Using gulpfile ~\Code\ZEN\gulpfile.js
[15:11:11] Starting 'trust-dev-cert'...
[15:11:11] Starting gulp
[15:11:11] Starting subtask 'trust-cert'...
[15:11:11] [trust-cert] Attempting to trust a development certificate. This self-signed certificate only points to localhost and will be stored in your local user profile to be used by other instances of 
debug-certificate-manager. If you do not consent to trust this certificate, click "NO" in the dialog.
[15:11:11] Error - 'trust-cert' sub task errored after 291 ms 
The executable file was not found: "certutil"
[15:11:11] 'trust-dev-cert' errored after 296 ms

Please help.

  • From the error it looks like you are missing executable file for "certutil", Can you verify if file exists for "CertUtil" can be found on the System32 directory (C:\Windows\System32\certutil.exe). Possible bug: github.com/SharePoint/sp-dev-docs/issues/316
    – Pradip R.
    Commented Aug 24, 2023 at 9:14
  • File is there. In the directory you pointed out. As a side note, my regular user on the box in not the one I am running VS Code with. I wonder if that is why the machine cannot communicate with itself. However, again - I am attempting to build SPFx environment with an account that is admin on the box. Commented Aug 25, 2023 at 13:41
  • Also please notice that there are more then one certutil files on hte machine Commented Aug 25, 2023 at 13:48


Your Answer

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

Browse other questions tagged or ask your own question.