you can downgrade your
Yeoman Generator to the version you require. After this, when you create a new solution or add webpart/extension to existing solution, it will not update
package.json configuration to latest version.
In order to downgrade your packages, you can use following command.
// To uninstall the package
npm -g uninstall @microsoft/generator-sharepoint
// Now add the package back using the version you require
npm i -g @firstname.lastname@example.org
For new solution, you can simply run the yo and the solution will be on 1.7.1 version. Now I already have a solution created using version 1.8.0.
In the solution folder, open
.yo-rc.json file, and update the version from
1.7.1. Now in
package.json file, remove all the
devDependencies which start with
@microsoft/*******. And finally delete the
node_modules folder completely. This will clean up all the packages from existing solution.
After this, you can do two things:
Case 2: Update Config Manually. In this you need to update the
package.json file by adding
@microsoft/*** packages reference under
dependencies and devDependencies. And run
npm install after that. Following will be the packages you need to add:
// Under "dependencies":
// Under "devDependencies":
npm install and your packages are with right versions required. Run
gulp serve command after this, and it should open browser running the localhost workbench.
Case 2: Run the yeoman generator again and add a webpart or extension your project, this will automatically add the missing
@microsoft/** packages to
In case you receive and error regarding NodeJS version, follow this URL to solve the issue.