Setting new SP2019 dev machine for SPFx
I've made this collection for any other time me or you will get a new SP machine for local dev.
Create your Web-App and change the hosts file with new value 127.0.0.1 my-webapp
Make browser stop asking for credentials endlessly
Sometimes you want to enable multi rdp (not multi user, just multi sessions for same user)
OR
And in that case, enable open chrome for other sessions
Setup dev environment for SPFx for 2019 (Also see Problems in the end)
Link to 8.17 https://nodejs.org/dist/v8.17.0/
Link to msi https://nodejs.org/dist/v8.17.0/node-v8.17.0-x64.msi
Unlike the article, installing node 8.x did not work, and I found someone stating that installing 14.x works great, so I uninstalled everything, deleted "npm" folders from AppData and reinstalled node 14.x and installed the rest with npm
npm install gulp yo @microsoft/generator-sharepoint --global
Then for every project you create you must do
- Select SharePoint 2019 and onward
- Create file npm-shrinkwrap.json as below
- npm install again
- gulp build will now work
Otherwise you will get gulp build error ReferenceError: primordials is not defined
and run npm i again, then gulp build will work
Enable App Catalog for SP2019 (Also see Problems in the end)
Save list as template for modern 2019 (SP PS)
(Get-SPSite -Identity "https://Server/sites/SiteURL").DenyPermissionsMask= [Microsoft.SharePoint.SPBasePermissions]::EmptyMask
OTHER PROBLEMS
Something stupid (MS-like), if your deployment fails with
Invalid SharePoint App Package. Error: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
That is because you created folders and solution names with dashes or spaces.
http://www.intelogist.eu/2020/02/how-to-resolve-part-uri-is-not-valid-spfx/
Another thing, if you get errors in the step of configuring Subscription Service, see how I solved it
https://bresleveloper.blogspot.com/2021/05/new-sharepoint-2019-machine-cant-login.html
Do you need help to stabilize your SPFx DEV machines?
Do you need Cloud Dev Machines for SPFx?
Can I help you develop SPFx for 365, SPO, or SP2019?
Comments
Post a Comment