错误-[信任证书] TypeError:无法读取null的属性“ toString”

时间:2020-11-12 07:41:28

标签: sharepoint gulp sharepoint-online yo

我正在构建我的第一个SharePoint客户端Web部件。我用过gulp trust-dev-cert,输出结果有2个错误。如何解决?

C:\sharepoint>gulp trust-dev-cert
Build target: DEBUG
[12:50:19] Using gulpfile C:\sharepoint\gulpfile.js
[12:50:19] Starting gulp
[12:50:19] Starting 'trust-dev-cert'...
[12:50:19] Starting subtask 'configure-sp-build-rig'...
[12:50:19] Finished subtask 'configure-sp-build-rig' after 5.6 ms
[12:50:19] Starting subtask 'trust-cert'...
[12:50:22] Error - [trust-cert] TypeError: Cannot read property 'toString' of null
[12:50:22] Error - 'trust-cert' sub task errored after 2.59 s
 Cannot read property 'toString' of null
[12:50:22] 'trust-dev-cert' errored after 2.93 s
[12:50:22]
[12:50:23] ==================[ Finished ]==================
Error - [trust-cert] TypeError: Cannot read property 'toString' of null
Error - 'trust-cert' sub task errored after 2.59 s
 Cannot read property 'toString' of null
[12:50:23] Project sharepoint version:0.0.1
[12:50:23] Build tools version:3.12.1
[12:50:23] Node version:v10.23.0
[12:50:23] Total duration:8.05 s
[12:50:23] Task errors:2

This is the content in the folder

1 个答案:

答案 0 :(得分:0)

您将需要在特定的SPFX Solution文件夹中运行gulp trust-dev-cert,请确保文件夹路径“ C:\ sharepoint”有效:

enter image description here