pnp / sp-dev-fx-vs-extension

Visual Studio extension work around SPFx together with community
MIT License
56 stars 25 forks source link

Incorrect Value type in package-solution.json file #38

Closed MichelLaplane closed 5 years ago

MichelLaplane commented 5 years ago

Category

[ ] Question [x] Bug [ ] Enhancement

Versions

[ 15.7.5 ] Visual Studio version (Help > About) [ 1.5.1.2 ] SPFx Generator version (npm list -g @microsoft/generator-sharepoint)

Expected or Desired Behavior

When running the generated project with F5 there should be no error.

Observed Behavior

When running the generated project with F5 there was an error

[14:52:33] Working directory changed to d:\Dev\MySPFxProject2\MySPFxProject2 Build target: DEBUG d:\Dev\MySPFxProject2\MySPFxProject2\node_modules\@microsoft\node-core-library\lib\JsonSchema.js:178 throw new Error(prefix + os.EOL + ^

Error: JSON validation failed: d:\Dev\MySPFxProject2\MySPFxProject2\config\package-solution.json

Error: #/solution/skipFeatureDeployment (If true, allow the tenant admin the c...) Expected type boolean but found type string

Turn around: Changing "false" to false for the "skipFeatureDeployment" in the package-solution.json file correct the problem.

Steps to Reproduce

Just launch the debugging session

eshupps commented 5 years ago

Fixed in v1.7.0.0

M365Bass commented 5 years ago

Installed SPFx generator (1.8.2) and VS 2019 Community edition as well as SPFx Visual Studio extension (https://marketplace.visualstudio.com/items?itemName=SharePointPnP.SPFxProjectTemplate#review-details) and I came across the same issue: running the project with F5 debug returns an error with package-solution.json "Expected type boolean but found type string", the workaround to manually change both skipFeatureDeployment and isDomainIsolated to false instead of "false" fixed it.

npm list -g @microsoft/generator-sharepoint -- @microsoft/generator-sharepoint@1.8.2 Visual Studio version 16.1.1 - Visual Studio Community 2019

eshupps commented 5 years ago

This is due to a bug in the Microsoft Yeoman generator. There is nothing we can do to fix it until Microsoft fixes it in the generator. Please add a comment to this issue to let them know a fix is still required: https://github.com/SharePoint/sp-dev-docs/issues/3042