Google Analytics

Thursday, February 8, 2018

Upgrade SPFx from 1.3.4 to 1.4.0

I just had to upgrade a SharePoint Framework client-side web part from v1.3.4 to v1.4.0.  Here are the steps I did to complete this.

  1. Run a command prompt as admin and upgrade the yoeman generator, npm install -g @microsoft/generator-sharepoint@latest
  2. Create a new web part project using the updated scaffolding engine using the settings I used originally.  For example, this project is based on the React template.  I selected that option again.
  3. In the project I was upgrading...
    1. Delete the node_modules folder and the package-lock.json file
    2. Compare and copy relevant packages/versions into your package.json file
    3. Replace the tsconfig.json file with one from the newly generated project
    4. npm install
    5. gulp clean
    6. gulp build
    7. Address any build errors.  For example, in my project I wasn't doing some Date casting correctly.  Typescript did a better job of identifying this and I had to correct those errors.

No comments:

Post a Comment