Forum Discussion
How do I upgrade my project to SPFx Generator 1.4.0 ?
Hi
I have a number of SPFx projects built using the SPFx generator 1.3.4 or before.
Is there any guidance how I upgrade these projects to the SPFx generator 1.4.0 as I am especially interested in the deploying all of the files (JSON, javascript) to the .sppkg file and hence to the Office365CDN.
If I create a new project using the SPFx generator v1.4.0 what files do I need to copy across to the new project from the 1.3.4 version of the project ?
Thanks
Nigel
Update an existent project to 1.4
To use the latest version of the SharePoint Framework you will have to update the packages of your project to do it follow the steps bellow
- Open the command line in the project folder
- Type
npm outdated
to get a list of all the outdated packages; from the list you will get:- Current version installed in your project
- Version requested by your project (available in package.json)
- Latest version available
SharePoint Framework packages are identified by the prefix Pernille-Eskebo/sp- - For each outdated package run the command
npm install mypackage@newversion –save
- Run the command
gulp --update
to update your config.json to the latest version - Once you get all the packages updated run the command
gulp clean
- Build your project again using the command
gulp build
and verify if the newer version didn’t cause any errors.
Note! When performing the update, I got this error:
Error – typescript –(0,0): error TS2688: Cannot find type definition file for ‘es6-collections’.
This is caused by the missing typing for the ES6, to fix it run the command:
npm install --save @types/es6-collections
2 Replies
- João FerreiraCopper Contributor
Update an existent project to 1.4
To use the latest version of the SharePoint Framework you will have to update the packages of your project to do it follow the steps bellow
- Open the command line in the project folder
- Type
npm outdated
to get a list of all the outdated packages; from the list you will get:- Current version installed in your project
- Version requested by your project (available in package.json)
- Latest version available
SharePoint Framework packages are identified by the prefix Pernille-Eskebo/sp- - For each outdated package run the command
npm install mypackage@newversion –save
- Run the command
gulp --update
to update your config.json to the latest version - Once you get all the packages updated run the command
gulp clean
- Build your project again using the command
gulp build
and verify if the newer version didn’t cause any errors.
Note! When performing the update, I got this error:
Error – typescript –(0,0): error TS2688: Cannot find type definition file for ‘es6-collections’.
This is caused by the missing typing for the ES6, to fix it run the command:
npm install --save @types/es6-collections
- Nigel_Price9911Iron Contributor
Thanks João Ferreira