Unable to determine the version of the current SharePoint Framework project #5725
-
Hello, I have latest m365 version: CLI for Microsoft 365 v7.2.0 package.json: {
"name": "search-renderer-v4",
"version": "0.0.1",
"private": false,
"main": "lib/index.js",
"scripts": {
"build": "gulp bundle",
"clean": "gulp clean",
"test": "gulp test"
},
"dependencies": {
"@microsoft/sp-lodash-subset": "1.15.2",
"@microsoft/sp-property-pane": "1.15.2",
"@microsoft/sp-webpart-base": "1.15.2",
"@pnp/modern-search-extensibility": "1.5.0",
"@pnp/odata": "^2.15.0",
"@pnp/sp": "^3.16.0",
"@pnp/spfx-controls-react": "^3.15.0",
"@pnp/spfx-property-controls": "^3.14.0",
"office-ui-fabric-react": "^7.204.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-js-pagination": "^3.0.3",
"react-text-truncate": "^0.19.0"
},
"devDependencies": {
"@microsoft/eslint-config-spfx": "1.15.2",
"@microsoft/eslint-plugin-spfx": "1.15.2",
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
"@microsoft/sp-build-web": "1.15.2",
"@microsoft/sp-module-interfaces": "1.15.2",
"@rushstack/eslint-config": "2.5.1",
"@types/react": "16.9.51",
"@types/react-dom": "16.9.8",
"@types/webpack-env": "~1.15.2",
"ajv": "^6.12.5",
"gulp": "4.0.2",
"typescript": "4.5.5",
"tslib": "2.3.1"
}
} .yo-rc.json: {
"@microsoft/generator-sharepoint": {
"plusBeta": false,
"isCreatingSolution": true,
"version": "1.15.2",
"libraryName": "search-renderer-v4",
"libraryId": "b21dc463-df68-4a23-b7a6-5aa33cedce7d",
"environment": "spo",
"packageManager": "npm",
"solutionName": "search-renderer-v4",
"solutionShortDescription": "search-renderer-v4 description",
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"componentType": "library"
}
} m365 command used: Could you advise me where could be the problem? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @Nevinia210 Weird, looking at the files you provided, the tool should be able to determine the project version. I copied your files in another project of mine and it seems to work just fine. |
Beta Was this translation helpful? Give feedback.
-
Hi @Nevinia210 found the issue. In your |
Beta Was this translation helpful? Give feedback.
Hi @Nevinia210 found the issue. In your
.yo-rc.json
file, you have a comment and an extra comma in your file. If you remove this comment, the JSON becomes valid again and the command works for me.