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

https://sharepoint.stackexchange.com/questions/11792/external-access-continually-prompted-for-credentials#answer-11846



Sometimes you want to enable multi rdp (not multi user, just multi sessions for same user)

https://social.technet.microsoft.com/Forums/en-US/c52b6da7-cdf2-4e1f-95d1-6471c6f2f6b0/easiest-way-to-enable-more-than-2-concurrent-rdp-sessions-on-windows-server-2016?forum=winserverTS#1701fa1f-c7fb-4093-a525-8b188e17c440

OR

https://help.matrix42.com/020_ESM/MyWorkspace/10MyWorkspace_Guide/HowTo%3A_Enable_multiple_sessions_for_Remote_Desktop_Services#:~:text=Enable%20Multiple%20RDP%20Sessions,-Log%20into%20the&text=Go%20to%20Computer%20Configuration%20%3E%20Administrative,Desktop%20Services%20session%20to%20Disabled.

And in that case, enable open chrome for other sessions

http://www.jochenhebbrecht.be/site/2015-09-13/windows/second-rdp-session-cant-open-a-chrome-window-if-first-session-runs-chrome-already



Setup dev environment for SPFx for 2019 (Also see Problems in the end)

https://social.technet.microsoft.com/wiki/contents/articles/53207.get-your-sharepoint-2019-environment-ready-for-spfx-development.aspx

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

solution
each project again create file npm-shrinkwrap.json and write inside
{
  "dependencies": {
    "graceful-fs": {
        "version""4.2.2"
     }
  }
}

and run npm i again, then gulp build will work



Enable App Catalog for SP2019 (Also see Problems in the end)

https://support.shortpoint.com/support/solutions/articles/1000273552-you-get-error-saying-sorry-apps-are-turned-off-if-you-know-who-runs-the-server-tell-them-to-enabl


Save list as template for modern 2019 (SP PS)

https://support.bindtuning.com/hc/en-us/articles/360030872511-Activate-Custom-Script-for-SharePoint-2019

(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?

Contact us now!





Comments

Popular posts from this blog

OverTheWire[.com] Natas Walkthrough - JUST HINT, NO SPOILERS

SOLVED The item could not be indexed successfully because the item failed in the indexing subsystem

Asp.Net Ending Response options, Response.End() vs CompleteRequest()