簡體   English   中英

包裝 SPFx 樣品

[英]Packaging SPFx Samples

我正在嘗試從 GitHub https://github.com/SharePoint/sp-dev-fx-webparts打包一些 SharePoint webparts

文檔庫https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-documents-detailslist

目標是從 SharePoint 中的不同網站集引入文檔庫

安全網格https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-securitygrid

安全網格將允許我的團隊快速訪問以控制誰有權訪問各種站點庫中的哪些文件。

我正在使用 VS Code、NVM、NPM 和 Gulp。 Doc Library Webpart 是 SPFx GA (1.0)。 使用 nvm 我設置 node 安裝 v6.17.1,結果如下

added 1691 packages from 1741 contributors and audited 111373 packages in 323.901s
found 884 vulnerabilities (295 low, 34 moderate, 548 high, 7 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

之后,我運行“gulp clean & gulp bundle --ship & gulp package-solution --ship”沒有問題。

我將包部署到我的 O365 租戶,但在嘗試將其添加到 SharePoint 頁面時不斷收到此錯誤。


Something went wrong
If the problem persists, contact the site administrator and give them the information in Technical Details.
Technical Details
[SPLoaderError.loadComponentError]:
***Failed to load component "8635c52e-cf0b-4c6d-a5ba-66f1d8d92005" (LibraryDocumentsWebPart). Original error: ***Failed to load URL '/sites/dev03/Style Library/CDN/react-documents-detailslist-librarydocumentswebpartstrings_en-us_f6b12acaf67a67cf5971e8da720715f9.js' for resource 'LibraryDocumentsWebPartStrings' in component '8635c52e-cf0b-4c6d-a5ba-66f1d8d92005' (LibraryDocumentsWebPart). The file was not found in the server.

***INNERERROR:
***Failed to load URL '/sites/dev03/Style Library/CDN/react-documents-detailslist-librarydocumentswebpartstrings_en-us_f6b12acaf67a67cf5971e8da720715f9.js' for resource 'LibraryDocumentsWebPartStrings' in component '8635c52e-cf0b-4c6d-a5ba-66f1d8d92005' (LibraryDocumentsWebPart). The file was not found in the server.
***CALLSTACK:
Error
   at t (https://spoprod-a.akamaihd.net/files/sp-client/sp-loader-assembly_en-us_3993179394b3b04563388c5043768f22.js:3:53337)
   at t (https://spoprod-a.akamaihd.net/files/sp-client/sp-loader-assembly_en-us_3993179394b3b04563388c5043768f22.js:1:139106)
   at e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client/sp-loader-assembly_en-us_3993179394b3b04563388c5043768f22.js:1:149068)
   at e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client/sp-loader-assembly_en-us_3993179394b3b04563388c5043768f22.js:1:145093)
   at Anonymous function (https://spoprod-a.akamaihd.net/files/sp-client/sp-loader-assembly_en-us_3993179394b3b04563388c5043768f22.js:1:135256)

對新程序員有什么幫助嗎?

直到 SharePoint 框架 1.4 版才添加了對在包中包含客戶端資產的支持。 在此之前,您需要手動部署這些附加資產。 請參閱此主題描述類似的問題,以及有關如何更新框架的官方文檔

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM