我在打包SharePoint应用程序时遇到问题。根据文档,我们需要运行:
npm install gulp bundle --ship gulp package-solution --ship
关于最后一条语句:gulp package-solution --ship我收到以下错误:错误-“package-solution”子任务在42毫秒后出错无法读取未定义的“package-solution”的属性“name”在50毫秒后出错
gulp package-solution --ship
pbossiut1#
此问题是文件package-solution.json中缺失的部分。需要有一个developer截面,见下图:
package-solution.json
developer
{ "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json", "solution": { "name": "my-sample-solution", "id": "fafafafa-1776-0911-bead-abbadabba123", "version": "2.0.0.0", "isDomainIsolated": false, "includeClientSideAssets": true, "developer": { "name": "your-company", "websiteUrl": "http://your-company.com", "mpnId": "", "termsOfUseUrl": "http://your-company.com/home/about#terms", "privacyUrl": "http://your-company.com/home/about#privacy" } }, "paths": { "zippedPackage": "solution/my-sample-solution.spapp" } }
在与此GitHub问题相关的线程中找到了解决方案:SharePoint repository issue #6144
1条答案
按热度按时间pbossiut1#
此问题是文件
package-solution.json
中缺失的部分。需要有一个
developer
截面,见下图:在与此GitHub问题相关的线程中找到了解决方案:SharePoint repository issue #6144