%3CLINGO-SUB%20id%3D%22lingo-sub-2128393%22%20slang%3D%22en-US%22%3EUse%20Node%20Version%20Manager%20to%20develop%20your%20SPFx%20apps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2128393%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3ETo%20develop%20applications%20for%20SharePoint%20or%20Microsoft%20Teams%20with%20the%20%3CA%20title%3D%22Overview%20of%20the%20SharePoint%20Framework%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fsharepoint-framework-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESPFx%20framework%3C%2FA%3E%2C%20a%20few%20requirements%20must%20be%20met%20on%20your%20development%20computer.%20Learn%20how%20to%20install%20the%20supported%20Node.js%20v10.x%20version%20and%20how%20you%20can%20use%20other%20Node.js%20versions%20additionally%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3Ewith%20Node%20Version%20Manager!%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--526101647%22%20id%3D%22toc-hId--526101643%22%3EWhy%3F%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20developer%2C%20it%20often%20makes%20sense%20to%20have%20multiple%20versions%20of%20a%20framework%20installed%20on%20a%20single%20computer.%20For%20developing%20an%20app%20for%20SharePoint%20Server%202019%20or%20SharePoint%20Online%20with%20the%20SPFx%20framework%2C%20you%20need%20to%20have%20%3CSTRONG%3ENode.js%20LTS%20v10.x.x%3C%2FSTRONG%3E%26nbsp%3Binstalled%20(LTS%20stands%20for%20Long%20Time%20Support).%20You%20can%20find%20all%20the%20requirements%20at%20%3CA%20title%3D%22Set%20up%20your%20SharePoint%20Framework%20development%20environment%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fset-up-your-development-environment%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESet%20up%20your%20SharePoint%20Framework%20development%20environment%3C%2FA%3E.%26nbsp%3BFor%20developing%20other%20web%20applications%2C%20e.g.%20when%20using%20frameworks%20such%20as%26nbsp%3B%3CSPAN%3EAngular%2C%26nbsp%3Byou%20might%20need%20other%20versions%20of%20Node.js%20installed.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20solutions%20for%20operation%20with%20several%20different%20versions%20of%20Node.js%20are%20supplied%20with%20the%20%3CSTRONG%3ENode%20Version%20Manager%20(NVM)%3C%2FSTRONG%3E.%20Here%20is%20a%20step-by-step%20guide%20on%20how%20to%20remove%20old%20versions%20of%20Node.js%2C%20how%20to%20install%20NVM%20and%20desired%20Node.js%20versions%2C%20and%20how%20to%20switch%20between%20the%20Node.js%20versions.%20After%20the%20installation%20process%2C%20learn%20how%20to%20develop%20your%20custom%20SharePoint%20app%20using%20the%20provided%20tools.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1961411186%22%20id%3D%22toc-hId-1961411190%22%3EInstall%20nvm%20and%20Node.js%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirst%2C%20follow%20the%20steps%20here%20to%20install%20the%20Node.js%20frameworks%20on%20your%20machine.%20Alternatively%2C%20there%C2%B4s%20a%20good%20description%20at%20%3CA%20title%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fnodejs%2Fsetup-on-windows%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fnodejs%2Fsetup-on-windows%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESet%20up%20your%20Node.js%20development%20environment%20directly%20on%20Windows%3C%2FA%3E.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CP%3EIf%20you%20already%20have%20installed%20other%20Node.js%20versions%2C%20it%C2%B4s%20a%20good%20idea%20to%20remove%20existing%20versions%20in%20the%20Windows%20Apps%20%26amp%3B%20Features%20settings.%20When%20you%20have%20a%20later%20version%2C%20such%20as%2014.5%2C%20already%20installed%2C%20it%C2%B4s%20usually%20not%20required%20to%20uninstall%20this%20version.%20nvm%20finds%20that%20version%20and%20allows%20to%20use%20it%20with%20nvm.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p1.png%22%20style%3D%22width%3A%20874px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254775iF70E60A1710450C9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p1.png%22%20alt%3D%22p1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3EAlternatively%2C%20when%20you%20have%20%3CA%20href%3D%22https%3A%2F%2Fchocolatey.org%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Echocolatey%3C%2FA%3E%20installed%2C%20you%20can%20run%3C%2FP%3E%0A%3CP%3E%3CEM%3Echoco%20uninstall%20nodejs%20-y%3CBR%20%2F%3E%3C%2FEM%3E(as%20I%20did%20on%20my%20machine%20to%20cleanup.)%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_1%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p2.png%22%20style%3D%22width%3A%20859px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254774i56C3F8BFFC3EBDAC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p2.png%22%20alt%3D%22p2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3EYou%20can%20install%20nvm%20from%20%3CA%20title%3D%22https%3A%2F%2Fgithub.com%2Fcoreybutler%2Fnvm-windows%23node-version-manager-nvm-for-windows%22%20href%3D%22https%3A%2F%2Fgithub.com%2Fcoreybutler%2Fnvm-windows%23node-version-manager-nvm-for-windows%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ENode%20Version%20Manager%20(nvm)%20for%20Windows%3C%2FA%3E%20by%20Corey%20Butler.%20The%20latest%20version%20is%20%3CA%20title%3D%22https%3A%2F%2Fgithub.com%2Fcoreybutler%2Fnvm-windows%2Freleases%2Ftag%2F1.1.7%22%20href%3D%22https%3A%2F%2Fgithub.com%2Fcoreybutler%2Fnvm-windows%2Freleases%2Ftag%2F1.1.7%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Envm%20v1.1.7%3C%2FA%3E.%20Download%20%3CA%20title%3D%22https%3A%2F%2Fgithub.com%2Fcoreybutler%2Fnvm-windows%2Freleases%2Fdownload%2F1.1.7%2Fnvm-setup.zip%22%20href%3D%22https%3A%2F%2Fgithub.com%2Fcoreybutler%2Fnvm-windows%2Freleases%2Fdownload%2F1.1.7%2Fnvm-setup.zip%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Envm-setup.zip%3C%2FA%3E%20and%20run%20it.%26nbsp%3BOr%2C%20you%20can%20use%20choco%20(if%20installed%20on%20your%20computer)%3A%20%3CBR%20%2F%3E%3CEM%3Echoco%20install%20nvm%20-y%3C%2FEM%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3ELet%C2%B4s%20check%20if%20nvm%20is%20working%3A%3C%2FP%3E%0A%3CP%3E%3CEM%3Envm%20ls%3C%2FEM%3E%20%3CBR%20%2F%3Eshould%20find%20no%20Node.js%20versions.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_2%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p3.png%22%20style%3D%22width%3A%20223px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254773i354DB7DAD488458D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p3.png%22%20alt%3D%22p3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3ETo%20see%20the%20latest%20Node.js%20versions%20check%20%3CA%20title%3D%22https%3A%2F%2Fnodejs.org%2Fen%2F%22%20href%3D%22https%3A%2F%2Fnodejs.org%2Fen%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fnodejs.org%2Fen%2F%3C%2FA%3E%2C%20or%20simply%20run%3C%2FP%3E%0A%3CP%3E%3CEM%3Envm%20ls%20available%3C%2FEM%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_3%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p4.png%22%20style%3D%22width%3A%20608px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254750iBB84025E20884DB4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p4.png%22%20alt%3D%22List%20available%20Node.js%20versions%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EList%20available%20Node.js%20versions%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3ENow%2C%20install%20the%20desired%20Node.js%20versions%3A%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CUL%3E%0A%3CLI%3E%3CP%3E%3CEM%3Envm%20install%2010.23.0%3C%2FEM%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_4%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p5.png%22%20style%3D%22width%3A%20430px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254770i42313897C54DFC12%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p5.png%22%20alt%3D%22p5.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3E%3CEM%3Envm%20install%2014.15.4%3C%2FEM%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_5%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p6.png%22%20style%3D%22width%3A%20428px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254771i02E6CE22572B1295%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p6.png%22%20alt%3D%22p6.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3EEtc.%20For%20the%20latest%20Node.js%20version%2C%20simply%20run%3C%2FP%3E%0A%3CP%3E%3CEM%3Envm%20install%20latest%3CBR%20%2F%3E%3C%2FEM%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CLI%3E%3CP%3ENow%20check%20the%20installed%20versions%3A%20%3CEM%3Envm%20ls%3C%2FEM%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_6%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p7.png%22%20style%3D%22width%3A%20187px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254769iEBA30A340B4B6233%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p7.png%22%20alt%3D%22p7.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3EYou%20can%20now%20switch%20between%20versions%20with%20nvm.%20Use%20%3CNVM%20version%3D%22%22%3E%2C%20e.g.%3C%2FNVM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3Envm%20use%2010.23.0%3C%2FEM%3E%20or%20%3CEM%3Envm%20use%2014.15.4%3C%2FEM%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThat%C2%B4s%20the%20basic%20installation%20of%20Node.js%20and%20%3CA%20href%3D%22https%3A%2F%2Fwww.npmjs.com%2Fget-npm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Enpm%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-153956723%22%20id%3D%22toc-hId-153956727%22%3EInstall%20the%20SPFx%20development%20tools%20once%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20install%20the%20required%20tools%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fset-up-your-development-environment%23install-yeoman%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eyo%3C%2FA%3E%3CEM%3E%20with%20the%20sharepoint%20generator%20%3C%2FEM%3Eand%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fset-up-your-development-environment%23install-gulp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Egulp%3C%2FA%3E%20and%20for%20SharePoint%20development%2C%20we%20follow%20the%20steps%20at%20%3CA%20title%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fset-up-your-development-environment%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fset-up-your-development-environment%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESet%20up%20your%20SharePoint%20Framework%20development%20environment%3C%2FA%3E.%20Here%20are%20the%20commands%20to%20run%20in%20a%20PowerShell%20console%3A%20First%2C%20switch%20to%20Node.js%20v10%2C%20confirm%2C%20(check%20the%20current%20version)%2C%20and%20install%20the%20tools%20with%20npm.%3C%2FP%3E%0A%3CP%3E%3CEM%3Envm%20use%2010.23.0%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3Enpm%20install%20gulp%20yo%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F41501%22%20target%3D%22_blank%22%3E%40microsoft%3C%2FA%3E%2Fgenerator-sharepoint%20--global%3C%2FEM%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_7%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p8.png%22%20style%3D%22width%3A%20859px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254776i0D8AD5EBF55E5A20%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p8.png%22%20alt%3D%22npm%20install%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Enpm%20install%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1653497740%22%20id%3D%22toc-hId--1653497736%22%3ECreate%20a%20new%20SPFx%20webpart%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20create%20a%20new%20SPFx%20app%2C%20follow%20the%20steps%20described%20at%20%3CA%20title%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fbuild-a-hello-world-web-part%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fbuild-a-hello-world-web-part%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EBuild%20your%20first%20SharePoint%20client-side%20web%20part%20(Hello%20World%20part%201)%3C%2FA%3E.%20In%20a%20new%20directory%2C%20run%3C%2FP%3E%0A%3CP%3E%3CEM%3Eyo%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F41501%22%20target%3D%22_blank%22%3E%40microsoft%3C%2FA%3E%2Fsharepoint%3C%2FEM%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_8%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p9.png%22%20style%3D%22width%3A%20859px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254777i41931FBEB0252D07%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p9.png%22%20alt%3D%22Run%20yo%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ERun%20yo%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20need%20to%20trust%20the%20development%20self-signed%20SSL%20certificate%20as%20described%20at%20%3CA%20title%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fset-up-your-development-environment%23trusting-the-self-signed-developer-certificate%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fset-up-your-development-environment%23trusting-the-self-signed-developer-certificate%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ETrusting%20the%20self-signed%20developer%20certificate%3C%2FA%3E%20here.%20Then%2C%20you%20can%20open%20the%20workbench%20with%20SSL.%3C%2FP%3E%0A%3CP%3E%3CEM%3Egulp%20trust-dev-cert%3C%2FEM%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_9%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p10.png%22%20style%3D%22width%3A%20859px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254778i43D4929EA0E7FAAD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p10.png%22%20alt%3D%22gulp%20trust-dev-cert%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Egulp%20trust-dev-cert%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20can%20open%20Visual%20Studio%20Code%20now%20to%20modify%20the%20solution%3A%20%3CEM%3Ecode%20.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-834015093%22%20id%3D%22toc-hId-834015097%22%3ERun%20the%20SPFx%20webpart%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20generated%20solution%20includes%20the%20sample%20app%20that%20can%20now%20be%20modified.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_10%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p11.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254779iC103D1F670979331%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p11.png%22%20alt%3D%22Coding...%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ECoding...%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20done%2C%20let%C2%B4s%20open%20the%20default%20browser%20with%20the%20gulp%20webserver%3A%3C%2FP%3E%0A%3CP%3E%3CEM%3Egulp%20serve%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EThis%20opens%20the%20SPFx%20workbench%2C%20in%20our%20sample%20at%20https%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fworkbench.html.%20Here%2C%20you%20can%20add%20the%20webpart%20to%20the%20workbench%20page%20and%20test%20it.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorToni%20Pohl_11%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22p12.png%22%20style%3D%22width%3A%20862px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254780i2F67EB283FBA5958%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22p12.png%22%20alt%3D%22Use%20the%20workbench%20to%20run%20the%20webpart%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EUse%20the%20workbench%20to%20run%20the%20webpart%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETip%3A%3C%2FSTRONG%3E%20When%20gulp%20serve%20is%20running%2C%20you%20can%20open%20your%20M365%20tenant%C2%B4s%20SPO%20site%20and%20use%20the%20custom%20webpart%20with%20the%20data%20from%20SharePoint%2C%20too%3A%20%3CA%20href%3D%22https%3A%2F%2F%253ctenant%253e.sharepoint.com%2Fsites%2F%253Csitename%253E%2F_layouts%2F15%2Fworkbench.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2F%3CTENANT%3E.sharepoint.com%2Fsites%2F%3CSITENAME%3E%2F_layouts%2F15%2Fworkbench.aspx%3C%2FSITENAME%3E%3C%2FTENANT%3E%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--973439370%22%20id%3D%22toc-hId--973439366%22%3EDeploy%20the%20SPFx%20solution%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20build%20the%20ready-to-use%20solution%2C%20run%3C%2FP%3E%0A%3CP%3E%3CEM%3Egulp%20bundle%20--ship%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3Eto%20build%20the%20package%20for%20the%20correct%20folder%20and%3C%2FP%3E%0A%3CP%3E%3CEM%3Egulp%20package-solution%20--ship%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3Eto%20create%20the%20%3CEM%3E%5Csharepoint%5Csolution%5C%3CPROJECT%3E.sppkg%3C%2FPROJECT%3E%3C%2FEM%3E%20file%20that%20can%20be%20uploaded%20to%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fuse-app-catalog%3FredirectSourcePath%3D%25252farticle%25252fuse-the-app-catalog-to-make-custom-business-apps-available-for-your-sharepoint-online-environment-0b6ab336-8b83-423f-a06b-bcc52861cba0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESharePoint%20App%20catalog%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1514073463%22%20id%3D%22toc-hId-1514073467%22%3EDevelop%20the%20solution%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20follow%20the%20next%20steps%20to%20develop%20the%20app%20described%20here%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CP%3E%3CA%20title%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fbuild-a-hello-world-web-part%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fbuild-a-hello-world-web-part%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EBuild%20your%20first%20SharePoint%20client-side%20web%20part%20(Hello%20World%20part%201)%3C%2FA%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3E%3CA%20title%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fconnect-to-sharepoint%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fconnect-to-sharepoint%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EConnect%20your%20client-side%20web%20part%20to%20SharePoint%20(Hello%20World%20part%202)%3C%2FA%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3E%3CA%20title%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fconnect-to-sharepoint%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fconnect-to-sharepoint%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EDeploy%20your%20client-side%20web%20part%20to%20a%20SharePoint%20page%20(Hello%20World%20part%203)%3C%2FA%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3E%3CA%20title%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fhosting-webpart-from-office-365-cdn%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fhosting-webpart-from-office-365-cdn%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EHost%20your%20client-side%20web%20part%20from%20Microsoft%20365%20CDN%20(Hello%20World%20part%204)%3C%2FA%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--293381000%22%20id%3D%22toc-hId--293380996%22%3ESwitch%20as%20required%20with%20nvm%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20Node%20Version%20Manager%20helps%20to%20work%20with%20multiple%20versions%20of%20Node.js%20for%20different%20purposes%20on%20the%20same%20machine.%20I%20hope%20this%20tip%20helps%20developers%20for%20a%20productive%20development%20environment!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHappy%20developing!%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2F%408341BD79091AF36AA2A09063B554B5CD%2Fimages%2Femoticons%2Fsmile_40x40.gif%22%20alt%3D%22%3Asmile%3A%22%20title%3D%22%3Asmile%3A%22%20%2F%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20title%3D%22blog.atwork.at%22%20href%3D%22https%3A%2F%2Fblog.atwork.at%2Fpost%2FUse-nvm-for-multiple-nodejs-versions%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EThis%20blog%20article%20is%20a%20repost%20from%20blog.atwork.at.%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2128393%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3ETo%20develop%20applications%20for%20SharePoint%20or%20Microsoft%20Teams%20with%20the%20%3CA%20title%3D%22Overview%20of%20the%20SharePoint%20Framework%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fsharepoint-framework-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESPFx%20framework%3C%2FA%3E%2C%20a%20few%20requirements%20must%20be%20met%20on%20your%20development%20computer.%20Learn%20how%20to%20install%20the%20supported%20Node.js%20v10.x%20version%20and%20how%20you%20can%20use%20other%20Node.js%20versions%20additionally%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3Ewith%20%3CSTRONG%3ENode%20Version%20Manager%3C%2FSTRONG%3E!%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2128393%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Edeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Enode%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esharepoint%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESPFx%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eteams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E

To develop applications for SharePoint or Microsoft Teams with the SPFx framework, a few requirements must be met on your development computer. Learn how to install the supported Node.js v10.x version and how you can use other Node.js versions additionally with Node Version Manager!

 

Why?

 

As developer, it often makes sense to have multiple versions of a framework installed on a single computer. For developing an app for SharePoint Server 2019 or SharePoint Online with the SPFx framework, you need to have Node.js LTS v10.x.x installed (LTS stands for Long Time Support). You can find all the requirements at Set up your SharePoint Framework development environment. For developing other web applications, e.g. when using frameworks such as Angular, you might need other versions of Node.js installed.

The solutions for operation with several different versions of Node.js are supplied with the Node Version Manager (NVM). Here is a step-by-step guide on how to remove old versions of Node.js, how to install NVM and desired Node.js versions, and how to switch between the Node.js versions. After the installation process, learn how to develop your custom SharePoint app using the provided tools.

 

Install nvm and Node.js

 

First, follow the steps here to install the Node.js frameworks on your machine. Alternatively, there´s a good description at Set up your Node.js development environment directly on Windows.

  • If you already have installed other Node.js versions, it´s a good idea to remove existing versions in the Windows Apps & Features settings. When you have a later version, such as 14.5, already installed, it´s usually not required to uninstall this version. nvm finds that version and allows to use it with nvm.

    p1.png

  • Alternatively, when you have chocolatey installed, you can run

    choco uninstall nodejs -y
    (as I did on my machine to cleanup.)

     

    p2.png

  • You can install nvm from Node Version Manager (nvm) for Windows by Corey Butler. The latest version is nvm v1.1.7. Download nvm-setup.zip and run it. Or, you can use choco (if installed on your computer):
    choco install nvm -y

  • Let´s check if nvm is working:

    nvm ls
    should find no Node.js versions.

     

    p3.png

  • To see the latest Node.js versions check https://nodejs.org/en/, or simply run

    nvm ls available

     

    List available Node.js versionsList available Node.js versions

  • Now, install the desired Node.js versions:

    • nvm install 10.23.0

       

      p5.png

    • nvm install 14.15.4

       

      p6.png

    • Etc. For the latest Node.js version, simply run

      nvm install latest

  • Now check the installed versions: nvm ls

     

    p7.png

  • You can now switch between versions with nvm. Use <nvm version>, e.g.

    nvm use 10.23.0 or nvm use 14.15.4

That´s the basic installation of Node.js and npm.

 

Install the SPFx development tools once

 

To install the required tools yo with the sharepoint generator and gulp and for SharePoint development, we follow the steps at Set up your SharePoint Framework development environment. Here are the commands to run in a PowerShell console: First, switch to Node.js v10, confirm, (check the current version), and install the tools with npm.

nvm use 10.23.0

npm install gulp yo @microsoft/generator-sharepoint --global

 

npm installnpm install

 

Create a new SPFx webpart

 

To create a new SPFx app, follow the steps described at Build your first SharePoint client-side web part (Hello World part 1). In a new directory, run

yo @microsoft/sharepoint

 

Run yoRun yo

 

You need to trust the development self-signed SSL certificate as described at Trusting the self-signed developer certificate here. Then, you can open the workbench with SSL.

gulp trust-dev-cert

 

gulp trust-dev-certgulp trust-dev-cert

You can open Visual Studio Code now to modify the solution: code .

 

Run the SPFx webpart

 

The generated solution includes the sample app that can now be modified.

 

Coding...Coding...

 

When done, let´s open the default browser with the gulp webserver:

gulp serve

This opens the SPFx workbench, in our sample at https://localhost:4321/temp/workbench.html. Here, you can add the webpart to the workbench page and test it.

 

Use the workbench to run the webpartUse the workbench to run the webpart

 

Tip: When gulp serve is running, you can open your M365 tenant´s SPO site and use the custom webpart with the data from SharePoint, too: https://<tenant>.sharepoint.com/sites/<sitename>/_layouts/15/workbench.aspx

 

Deploy the SPFx solution

 

To build the ready-to-use solution, run

gulp bundle --ship

to build the package for the correct folder and

gulp package-solution --ship

to create the \sharepoint\solution\<project>.sppkg file that can be uploaded to the SharePoint App catalog.

 

Develop the solution

 

You can follow the next steps to develop the app described here:

 

Switch as required with nvm

 

The Node Version Manager helps to work with multiple versions of Node.js for different purposes on the same machine. I hope this tip helps developers for a productive development environment!

 

Happy developing! :smile:

 

This blog article is a repost from blog.atwork.at.