SOLVED

SPFx with jquery & sp-pnp-js: definitive project start activity?

%3CLINGO-SUB%20id%3D%22lingo-sub-63432%22%20slang%3D%22en-US%22%3ESPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-63432%22%20slang%3D%22en-US%22%3E%3CP%3ESorry%20if%20this%20seems%20like%20a%20basic%20question%2C%20but%20I%20am%20an%20absolute%20beginner%20with%20all%20the%20new%20tooling%20and%20language%20stuff%20around%20SPFx%20development.%20%26nbsp%3BWhat%20are%20the%20steps%20to%20start%20a%20new%20web%20part%20that%20will%20use%20jQuery%20and%20sp-pnp-js%20and%20test%20on%20my%20sp-online%20dev%20tennant%3F%20%26nbsp%3BSo%20far%2C%20what%20I%20can%20tell%20is%20I%20have%20to%20do%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E*%20create%20a%20new%20folder%20and%20navigate%20to%20it%20in%20the%20PS%20shell%3C%2FP%3E%3CP%3E*%20%26gt%3Byo%26nbsp%3B%3Ca%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F41501%22%3E%40microsoft%3C%2Fa%3E%2FSharePoint%3C%2FP%3E%3CP%3E*%20%26gt%3Bgulp%20trust-dev-cert%3C%2FP%3E%3CP%3E*%20%26gt%3Bnpm%20install%20jquery%20--%20save%3C%2FP%3E%3CP%3E*%20%26gt%3Bnpm%20install%26nbsp%3B%40types%2Fjquery%20--save%3C%2FP%3E%3CP%3E*%20%26gt%3Bnpm%20install%20sp-pnp-js%20--save%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%2C%20to%20the%20top%20of%20the%20webpart.ts%20file%20%26nbsp%3BI%20add%20import%20statements%3A%3C%2FP%3E%3CP%3Eimport%20pnp%20from%20%22sp-pnp-js%22%3B%3CBR%20%2F%3Eimport%20%22jquery%22%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAt%20this%20point%20I%20should%20be%20able%20to%20do%20a%20%22gulp%20serve%22%20and%20see%20the%20default%20generated%20web%20part%20in%20the%20local%20workbench.%20%26nbsp%3BUnfortunately%20the%20pnp%20library%20gets%20a%20red-squiggle%20underline%20and%20the%20gulp%20serve%20output%20complains%20about%20%22unused%20imports%22.%20%26nbsp%3BCan%20someone%20point%20me%20to%20what%20I%20am%20missing%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20can%20a%20simple%20%22recipe%22%20like%20I%20have%20above%20be%20added%20to%20the%20documentation%20somewhere%20so%20doofus%20newbies%20like%20me%20don't%20have%20to%20come%20and%20bother%20you%20good%20folks%20just%20to%20get%20started%3F%20%3B)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-67043%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-67043%22%20slang%3D%22en-US%22%3E%3CP%3ETo%20your%20question%20about%20Node.js%20%2F%20NPM%20putting%20*.js%20files%20in%20your%20roaming%20profile%2C%20that's%20correct...%20that's%20how%20it%20works.%20NPM%20always%20puts%20globally%20installed%20packages%20in%20your%20roaming%20profile.%20If%20your%20corp%20security%20policy%20blocks%20JS%20files%20in%20that%20location%2C%26nbsp%3Bthey%20are%20going%20to%20be%20screwing%20up%20anything%20Node.js%20related.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDid%20you%20get%20any%20errors%26nbsp%3Bwhen%20installing%20Node.js%2C%20NPM%20or%20global%20packages%3F%20The%20NPM%20troubleshooting%20wiki%20has%20a%20bunch%20of%20stuff%20about%20issues%20with%20Windows%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnpm%2Fnpm%2Fwiki%2FTroubleshooting%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fnpm%2Fnpm%2Fwiki%2FTroubleshooting%3C%2FA%3E.%20Not%20sure%20if%20that%20will%20help%20at%20all.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20you%20looked%20at%20using%20NVM%20to%26nbsp%3Bmanage%20Node.js%2FNPM%2Fglobal%20packages%20on%20Windows%3F%20I%20find%20it%20to%20be%20a%20huge%20benefit...%20works%20great%20for%20getting%26nbsp%3Baround%26nbsp%3Badmin%20requirements...%20I'm%20not%20sure%20if%20it%20will%20help%20you%20because%20I've%20run%20through%20the%20process%20on%20my%20MacOS%20%26amp%3B%20Windows10%20machines%20without%20issue%2C%20even%20after%20reboots.%20%3A(%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-66817%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-66817%22%20slang%3D%22en-US%22%3EHi%20Joseph%2C%3CBR%20%2F%3Eyeah%2C%20I%20also%20suspected%20some%20IT%20stuff%2C%20as%20worked%20on%20my%20PC%20too.%20Anyway%2C%20the%20azure%20VM%20is%20a%20good%20idea.%20About%20stopping%20the%20VM%2C%20I%20think%20there's%20an%20auto-shutdown%20machine%20option%20from%20the%20portal%20(at%20least%20with%20VMs%20using%20Resource%20Manager%2C%20not%20sure%20about%20%22classic%22%20Azure%20VMs)%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fes-es%2Fblog%2Fannouncing-auto-shutdown-for-vms-using-azure-resource-manager%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fazure.microsoft.com%2Fes-es%2Fblog%2Fannouncing-auto-shutdown-for-vms-using-azure-resource-manager%2F%3C%2FA%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-66816%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-66816%22%20slang%3D%22en-US%22%3E%3CP%3EFurther%20testing%20has%20turned%20up%20some%20interesting%20facts%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20colleague%20who%20tested%20this%20with%20me%20on%20Monday%20and%20had%20the%20same%20issues%20as%20I%20did%20on%20his%20corporate-issued%20development%20box%2C%20went%20through%20the%20process%20again%20on%20a%20different%20machine%2C%20his%20own%20personal%20gaming%20box%20running%20Windows%2010.%20%26nbsp%3BOn%20that%20box%2C%20it%20worked%20perfectly%2C%20even%20after%20a%20reboot.%20%26nbsp%3BSo%3A%20non-corporate%20image%20running%20W10%20--%20OK.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20next%20thought%20was%20to%20test%20on%20a%20non-corporate%20image%20W7%20box.%20%26nbsp%3BIt%20occured%20to%20me%20(belatedly%2C%20duh)%20that%20I%20was%20under-utilizing%20my%20free%20Azure%20allocation%2C%20so%20I%20created%20a%20clean%20new%20W7%20VM%20and%20installed%20all%20the%20tooling%20and%20libraries%20there.%20%26nbsp%3BAmazingly%2C%20everything%20worked%20as%20it%20should%2C%20including%20the%20integration%20of%20the%20additional%20jquery%20and%20sp-pnp-js%2C%20even%20after%20a%20reboot.%20So%3A%20non-corporate%20image%20running%20W7%20--%20OK.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGiven%20that%20the%20troubles%20both%20of%20us%20had%20were%20on%20our%20corporate-imaged%2Fmanaged%20laptops%2C%20and%20given%20the%20fact%20that%20the%20diagnostics%20you%20asked%20for%20revealed%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EPS%20C%3A%5Cprojects%5Cquicklinks%26gt%3B%20npm%20list%20-g%20--depth%3D0%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EC%3A%5CUsers%5Cjoseph_ackerman%5CAppData%5CRoaming%5Cnpm%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%2B--%20%3C%2FSPAN%3E%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%3CSPAN%3E%2Fgenerator-sharepoint%401.0.2%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%2B--%20gulp%403.9.1%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%60--%20yo%401.8.5%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20concluded%20that%20there%20must%20be%20some%20IT-mandated%20configuration%20of%20our%20security%20software%2C%20or%20perhaps%20some%20sort%20of%20enforced%20Windows%20policy%2C%20that%20does%20not%20like%20something%20it%20is%20finding%20in%20that%20appdata%5Croaming%5Cnpm%20path.%20%26nbsp%3BIf%20npm%20is%20putting%20.JS%20or%20.JSON%20files%20somewhere%20down%20that%20tree%2C%20it%20may%20be%20that%20my%20system%20configuration%20(as%20enforced%20by%20my%20company)%20sees%20those%20files%20as%20a%20threat%20and%20is%20removing%20or%20renaming%20them.%20That%20feels%20like%20a%20very%20plausible%20theory%20for%20the%20behavior%20I%20and%20my%20colleague%20have%20been%20experiencing.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20tired%20of%20researching%20this%20instead%20of%20learning%20how%20to%20actually%20use%20SPFx%20and%20sp-pnp-js%2C%20so%20rather%20than%20taking%20on%20Corporate%20IT%20Don%20Quixote-style%20and%20trying%20to%20make%20an%20exception%20for%20me%20and%20my%20team%2C%20it%20looks%20like%20my%20SPFx%20work%20will%20be%20in%20that%20Azure%20VM%20for%20the%20time%20being.%20%26nbsp%3BI%20just%20have%20to%20remember%20to%20stop%20the%20instance%20running%20when%20I%20finish%20my%20work%20day!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20help%20and%20interest%20(and%20to%20everyone%20who%20contributed).%20%26nbsp%3BOn%20to%20my%20next%20challenge!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-66529%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-66529%22%20slang%3D%22en-US%22%3E%3CP%3E%26gt%3B%26gt%3B%3CEM%3EI%20understand%20the%20frustration%2C%20but%26nbsp%3Byour%20characterization%20at%20the%20end%20isn't%20really%20fair%3C%2FEM%3E%26lt%3B%26lt%3B%3C%2FP%3E%3CP%3EYeah%2C%20I'm%20really%20good%20at%20being%20unfair%20when%20I%20get%20frustrated.%20%26nbsp%3BSorry%20'bout%20that%20%3B)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26gt%3B%26gt%3B%3CEM%3EWe've%20dealt%20with%20this%20before...%3C%2FEM%3E%26lt%3B%26lt%3B%3C%2FP%3E%3CP%3EI%20hear%20what%20you're%20saying%2C%20but%20as%20far%20as%20I%20can%20see%20that's%20all%20the%20more%20reason%20we%20shouldn't%20have%20to%20deal%20with%20it%20%3CEM%3Eagain%3C%2FEM%3E.%20Completely%20re-architecting%20the%20customizations%20platform%20every%20three%20years%20is%20not%20a%20recipe%20for%20engendering%20developer%20good-will.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20I'm%20not%20alone%20here%3A%20I%20have%20a%20colleague%20who%20left%20SP%20development%20all-together%20when%20everything%20went%20remote%20in%20late%202012%20--%20he%20was%20upset%20that%20the%20very%26nbsp%3Brobust%20application%20platform%20he%20had%20used%20to%20build%20amazing%20solutions%20was%20being%20deprecated%20because%20so%20many%20in%20the%20coding%20community%20couldn't%20manage%20to%20write%20web%20parts%20that%20didn't%20crash%20their%20servers%20(nested%20using()%7B%7D%20blocks%20and%20the%20occasional%20web.dispose()%20were%20our%20best%20friends).%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20stuck%20it%20out%20hoping%20things%20would%20get%20better%2C%20and%20they%20have%20somewhat%2C%20but%20my%20current%20opinion%20based%20on%2030%20years%20of%20work%20in%20the%20industry%20is%20that%20%3CEM%3Ethis%20feels%20a%20lot%20like%20the%20introduction%20of%20Java%20in%20'96%3A%20everyone's%20excited%20about%20it%20but%20it's%20under-baked%20and%20not%20really%20ready%20for%20prime-time%3C%2FEM%3E.%20%26nbsp%3BI%20will%20be%20*%3CSTRONG%3Ethrilled%3C%2FSTRONG%3E*%20to%20be%20proven%20wrong.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26gt%3B%26gt%3B%3CEM%3Edid%20you%20use%20the%20repo%20that%20someone%26nbsp%3Bcreated%20above%20to%20get%20the%20error%3F%3C%2FEM%3E%26lt%3B%26lt%3B%3C%2FP%3E%3CP%3EThat%20repo%20is%20my%20project%20(sans%20the%20node_modules%20branch%2C%20per%20your%20request%20above)%20in%20whatever%20state%20it%20was%20in%20on%20the%20day%20the%20repo%20was%20created.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26gt%3B%26gt%3B%3CSPAN%3ECan%20you%20run%20the%20following%3C%2FSPAN%3E%26lt%3B%26lt%3B%3C%2FP%3E%3CP%3ESure%2C%20and%20here%20are%20the%20results%3A%3C%2FP%3E%3CP%3EPS%20C%3A%5Cprojects%5Cquicklinks%26gt%3B%20node%20-v%3CBR%20%2F%3Ev6.10.2%3CBR%20%2F%3EPS%20C%3A%5Cprojects%5Cquicklinks%26gt%3B%20npm%20-v%3CBR%20%2F%3E3.10.10%3CBR%20%2F%3EPS%20C%3A%5Cprojects%5Cquicklinks%26gt%3B%20npm%20list%20-g%20--depth%3D0%3CBR%20%2F%3EC%3A%5CUsers%5Cjoseph_ackerman%5CAppData%5CRoaming%5Cnpm%3CBR%20%2F%3E%2B--%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%401.0.2%3CBR%20%2F%3E%2B--%20gulp%403.9.1%3CBR%20%2F%3E%60--%20yo%401.8.5%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20chiming%20in.%20%26nbsp%3BHope%20this%20info%20points%20to%20something.%20%26nbsp%3BGiven%20that%20I%20can%20see%20that%20my%20%3CUSER%3E%5Cappdata%5Croaming%20folder%20is%20somehow%20involved%2C%20is%20it%20possible%20that%20some%20special%20path%20configuration%20is%20getting%20set%20by%20npm%20when%20I%20install%20other%20libraries%20but%26nbsp%3Bis%20not%20getting%20saved%20%26nbsp%3B(or%20is%20getting%20removed)%20so%20that%20it%20is%20not%20picked%20up%20when%20I%20reboot%3F%3C%2FUSER%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EFootnote%3A%3C%2FSTRONG%3E%20Interestingly%2C%20I%20had%20a%20three-hour%20screen%20share%20session%20with%20another%20developer%20on%20my%20team%20yesterday%20just%20to%20put%20another%20pair%20of%20eyes%20on%20it%2C%20and%20he%20and%20I%20went%20through%20the%20process%20of%20setting%20up%20his%20machine%20for%20SPFx%20development.%20%26nbsp%3BHe%20built%20his%20first%20web%20part%20no%20problem%2C%20just%20like%20me.%26nbsp%3BAdded%20jquery%20and%20sp-pnp-js%20just%20like%20me.%20%26nbsp%3BEverything%20went%20fine%2C%20just%20like%20me.%20%26nbsp%3BHe%20then%20rebooted%20his%20machine%20and%20went%20back%20to%20the%20project%20folder%20and%20did%20a%20gulp%20serve%2C%20and%20got%20the%20%22sp-pnp-js%20not%20found%22%20error.%20Unfortunately%2C%20%3CEM%3Ejust%20like%20me.%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-66007%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-66007%22%20slang%3D%22en-US%22%3E%3CP%3EI%20understand%20the%20frustration%2C%20but%26nbsp%3Byour%20characterization%20at%20the%20end%20isn't%20really%20fair.%20I'm%20not%20a%20fan%20of%20the%20huge%26nbsp%3Bdependency%26nbsp%3Btree%20or%20at%20least%20the%20way%26nbsp%3Bthey've%26nbsp%3Brolled%20it%20out%20today%20(NPM%20shrinkwrap%20would%20have%20been%20better...%26nbsp%3Bor%26nbsp%3Bdependency%20tree%20that%20isn't%20nearly%20as%20big).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe've%20dealt%20with%20this%20before...%20I%20recall%20SharePoint%20developers%20waking%20up%20only%20to%20have%20COM%2B%20issues%20happen%20seemingly%20overnight%20for%20no%20reason.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQuestion%3A%20did%20you%20use%20the%20repo%20that%20someone%26nbsp%3Bcreated%20above%20to%20get%20the%20error%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20run%20the%20following%20at%20the%20command%20line%20and%20paste%20the%20results%20for%20each%20one%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3Enode%20-v%0Anpm%20-v%0Anpm%20list%20-g%20--depth%3D0%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-65997%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-65997%22%20slang%3D%22en-US%22%3E%3CP%3EWell%2C%20looks%20like%20we%20are%20back%20to%20square%20one.%20%26nbsp%3BI%20am%20getting%20the%20red%20squiggly%20and%20the%20%22sp-pnp-js%22%20not%20found%20again.%20%26nbsp%3BFriday%20afternoon%2C%20everything%20was%20just%20fine%20as%20I%20mentioned%20in%20my%20last%20post%26nbsp%3Bbut%20rebooting%20my%20machine%20today%20I%20got%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPS%20C%3A%5Cprojects%5Cquicklinks%26gt%3B%20gulp%20serve%3CBR%20%2F%3EBuild%20target%3A%20DEBUG%3CBR%20%2F%3E%5B18%3A04%3A09%5D%20Using%20gulpfile%20C%3A%5Cprojects%5Cquicklinks%5Cgulpfile.js%3CBR%20%2F%3E%5B18%3A04%3A09%5D%20Task%20'C%3A%5CUsers%5Cjoseph_ackerman%5CAppData%5CRoaming%5Cnpm%5Cgulp.cmd'%20is%20not%20in%20your%20gulpfile%3CBR%20%2F%3E%5B18%3A04%3A09%5D%20Please%20check%20the%20documentation%20for%20proper%20gulpfile%20formatting%3CBR%20%2F%3E%5B18%3A04%3A09%5D%20Task%20'C%3A%5CUsers%5Cjoseph_ackerman%5CAppData%5CRoaming%5Cnpm%5Cgulp.cmd'%20is%20not%20in%20your%20gulpfile%3CBR%20%2F%3E%5B18%3A04%3A09%5D%20Please%20check%20the%20documentation%20for%20proper%20gulpfile%20formatting%3CBR%20%2F%3EAbout%20to%20exit%20with%20code%3A%201%3CBR%20%2F%3EProcess%20terminated%20before%20summary%20could%20be%20written%2C%20possible%20error%20in%20async%20code%20not%20continuing!%3CBR%20%2F%3ETrying%20to%20exit%20with%20exit%20code%201%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20two%20minutes%20later%2C%20I%20tried%20again%20and%20instead%20of%20that%20response%2C%20I%20got%20the%20old%20one%20that%20is%20embedded%20as%20an%20image%20above%20in%20this%20thread%20with%20these%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%5B18%3A21%3A53%5D%20Error%20-%20typescript%20-%20src%5Cwebparts%5Cquicklinks%5CQuicklinksWebPart.ts(21%2C16)%3A%20error%20TS2307%3A%20Cannot%20find%20module%20'sp-pnp-js'.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EI%20am%20left%20thinking%20only%20that%20my%20boot%20up%20sequence%20is%20somehow%20breaking%20the%20tool%20chain.%3C%2FEM%3E%20%26nbsp%3BBeing%20new%20to%20all%20of%20this%20new%20CLI%20stuff%20(the%20old%20ones%20I%20understood%20and%20wrote%20many%20C%20and%20Clipper%20programs%20back%20in%20the%2080's)%2C%20%26nbsp%3BI%20haven't%20the%20faintest%20idea%20what%20to%20do%20next.%20%26nbsp%3BVery%20frustrating.%20%26nbsp%3BI%20can't%20even%20express%20how%20much%20I%20hate%20this.%20%26nbsp%3BWhen%20I%20build%20SP%20Add-ins%20with%20Visual%20Studio%20and%20NuGet%2C%20it%20just%20*works*.%20%26nbsp%3BStarting%20every%20work%20day%20with%20a%20new%20%22WTF%3F%22%20moment%20is%20no%20fun.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20new%20process%20is%20too%26nbsp%3Bfragile%3A%20too%20many%20vendors%2C%20too%20many%20interlocking%20tools%20expecting%20to%20much%20of%20each%20other's%20output%2C%20not%20enough%20*specific*%20error%20information%20when%20things%20fail.%20%26nbsp%3BI%20committed%20to%20the%20Microsoft%20stack%20back%20in%20the%20early%2090's%20because%20they%20had%20the%20best%20tools%20and%20superior%20documentation%20(at%20the%20time%2C%20Visual%20Basic%20was%20*awesome*).%20%26nbsp%3BNow%20it's%20%22Use%20these%205%20other%20things%20and%20if%20it%20doesn't%20work%2C%20tough%22.%20Sorry%20for%20the%20rant%2C%20but%20this%20is%20crazy-making.%20%26nbsp%3BThanks%20for%20listening.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-65920%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-65920%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CBR%20%2F%3E%26gt%3B%26gt%3B%3CEM%3Emy%20theory%20that%20is%20something%20related%20with%20the%20framework%20installed.%20Did%20you%20try%20to%20re-install%20the%20entire%20spfx%3F%3C%2FEM%3E%26lt%3B%26lt%3B%3C%2FBLOCKQUOTE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20started%20fresh%20and%20reinstalled%20everything%2C%20and%20now%20plain%20vanilla%20gulp%20serve%20with%20just%20the%20imports%20statements%20for%20the%20jquery%20and%20sp-pnp-js%20libraries%20seems%20to%20be%20working.%20%26nbsp%3BGood%20call%20on%20the%20reinstall%20of%20the%20SPFx.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOf%20course%20now%20I've%20got%20some%20other%20issues...but%20that%20needs%20to%20be%20its%20own%20thread%20%3B)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-65679%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-65679%22%20slang%3D%22en-US%22%3E%3CP%3EWill%20try%20it.%20%26nbsp%3BThanks%20Luis.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-65353%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-65353%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Joseph%2C%3CBR%20%2F%3EI've%20cloned%20your%20repo%2C%20then%20npm%20install%2C%20and%20then%20gulp%20serve%2C%20and%20has%20worked%20fine%20on%20my%20machine%20(hate%20to%20say%20that%2C%20but%20it's%20true).%20I've%20not%20tested%20inside%20SP%2C%20but%20thing%20is%20that%20it%20bundles%20fine%20and%20doesn't%20complain%20about%20sp-pnp-js.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F13816iF61B7D38E18B69F4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Capture.PNG%22%20title%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThat%20enforces%20my%20theory%20that%20is%20something%20related%20with%20the%20framework%20installed.%20Did%20you%20try%20to%20re-install%20the%20entire%20spfx%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Enpm%20uninstall%20-g%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%3C%2FP%3E%3CP%3Enpm%20install%20-g%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%40latest%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-64913%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-64913%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20your%20kind%20offer%2C%20Andrew.%20%26nbsp%3B(Looking%20forward%20to%20the%20new%20Voitanos%20content%2C%20btw)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20find%20it%20here%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Facksoft%2FQuickLinks%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Facksoft%2FQuickLinks%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-64895%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-64895%22%20slang%3D%22en-US%22%3E%3CP%3EI'll%20take%20a%20look%20and%20see%20if%20I%26nbsp%3Bcan't%20get%20you%20sorted.%20Can%20you%20share%20the%20project%20somewhere%3F%20Ideally%2C%20remove%20the%26nbsp%3B%3CSTRONG%3Enode_modules%3C%2FSTRONG%3E%20folder...%20pushing%20to%20a%20github%20public%20repo%20%26amp%3B%20sending%20the%20URL%20will%20be%20perfect.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-64845%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-64845%22%20slang%3D%22en-US%22%3E%3CP%3EDean%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20reference.%20%26nbsp%3BI%20have%20actually%20already%20signed%20up%20at%20Voitano%20for%20the%20bundle%20and%20have%20watched%20some%20of%20the%20content%20already.%20%26nbsp%3BAlso%20worked%20through%20the%206%20or%207%20lessons%20on%20the%20MS%20getting%20started%20web%20site.%20%26nbsp%3B%3CEM%3EGetting%20SPFx%20to%20work%20hasn't%20actually%20been%20the%20issue%20here%3C%2FEM%3E.%20%26nbsp%3BI%20want%20to%20make%20it%20clear%20to%20everyone%20who%20cares%20to%20read%20this%20thread%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EThe%20problem%20is%20integrating%20sp-pnp-js%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20done%20several%20%22sample%22%20type%20%22build%20your%20first%20SPFx%20web%20part%22%20projects%20and%20have%20had%20no%20problem%20with%20anything%20not%20working%20as%20it%20is%20supposed%20to.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20issue%20I%20get%20is%20that%20even%20after%20following%20the%20advice%20in%20the%20PnP%20JS%20github%20repo%2C%20I%20still%20get%20a%20%22red%20squiggly%22%20under%20%22sp-pnp-js%22%20in%20the%20code%20editor%20and%20errors%20in%20the%20gulp%20response%20as%20illustrated%20in%20one%20of%20the%20earlier%20posts%20in%20this%20thread.%20Apparently%20TS%20is%20not%20finding%20the%20PnP%2C%20and%20I%20just%20don't%20see%20why%20not%20because%20I%20have%20done%20everything%20I%20was%20told%20to%20do.%20%26nbsp%3BIt%20works%20for%20jQuery.%20%26nbsp%3BIt%20does%20not%20work%20for%20sp-pnp-js%20(unless%2C%20as%20I%20stated%20above%2C%20I%20first%20uninstall%20and%20then%20reinstall%20everything%20--%20which%20I%20have%20to%20do%20every%20day%20I%20boot%20up%20to%20work%20on%20this%20thing).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20just%20want%20to%20get%20this%20fixed%20so%20I%20can%20move%20on%20to%20the%20real%20work%20of%20solving%20my%20customer's%20business%20issues%20instead%20of%20figuring%20out%20why%20my%20editor%2Fcompiler%20can't%20find%20something.%20%26nbsp%3BIf%20anyone%20can%20help%20me%20help%20my%20compiler%20find%20the%20%22sp-pnp-js%22%20library%20I%20would%20be%20extremely%20grateful.%20%26nbsp%3BThanks%20again.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-64835%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-64835%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20mention%26nbsp%3B%3Ca%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F89338%22%3E%40Dean%3C%2Fa%3E...%20to%20be%20fair%20that%20starter%20bundle%20only%20covers%20the%20getting%20started%20part%20of%20SPFx...%20not%20building%20anything...%26nbsp%3Bjust%20(1)%20understanding%20what%20SPFx%20is%20%26amp%3B%20(2)%26nbsp%3Bhow%20to%20get%20the%20dev%20toolchain%20setup.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-64818%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-64818%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F8573%22%20target%3D%22_blank%22%3E%40Andrew%20Connell%3C%2FA%3E%26nbsp%3Bhas%20a%20starter%20kit%20that%20you%20may%20find%20helpful%2C%20see%20%3CA%20href%3D%22http%3A%2F%2Fwww.andrewconnell.com%2Fblog%2Fnow-available-mastering-the-sharepoint-framework-starter-bundle%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.andrewconnell.com%2Fblog%2Fnow-available-mastering-the-sharepoint-framework-starter-bundle%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-64815%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-64815%22%20slang%3D%22en-US%22%3E%3CP%3E%26gt%3B%26gt%3B%3CSPAN%3EI%20know%20is%20tedious%2C%20but%2C%20can%20you%20try%20the%20same%20in%20another%20machine%20without%20the%20spfx%20%2F%20npm%20%2F%20gulp%20installed%3F%3C%2FSPAN%3E%26lt%3B%26lt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20understand%20the%20value%20of%20that%20process%2C%20but%20unfortunately%20that's%20not%20possible%20--%20I'm%20a%20remote%20consultant%20at%20the%20moment%20without%20access%20to%20a%20corporate%20environment%20where%20there%20might%20be%20other%20machines%20available%20for%20me%20to%20test%20on.%20%26nbsp%3BAdditionally%2C%20my%20task%20is%20to%20create%20an%20SPFx%20web%20part%2C%20so%20getting%20sp-pnp-js%20to%20work%20without%20all%20that%20stuff%20would%20be%20instructive%2C%20but%20not%20really%20helpful%20since%20it's%20what%20I%20am%20actually%20trying%20to%20achieve.%20%26nbsp%3BI'll%20have%20to%20abandon%20PnP%20before%20SPFx%26nbsp%3Bif%20it%20comes%20down%20to%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20had%20hoped%20to%20be%20able%20get%20around%20all%20the%20SP%20REST%20plumbing%20and%20simplify%20my%20code%20with%20PnP.%20%26nbsp%3BBut%20if%20it%20becomes%20more%20work%20than%20what%20it%26nbsp%3Bis%20supposed%20to%20replace%2C%20there's%20really%20no%20point%20in%20pursuing%20it.%20%26nbsp%3BIf%20I%20can't%20get%20this%20going%20today%2C%20it's%20just%20going%20to%20have%20to%20go%20away%20because%20I%20can't%20justify%20wasting%20any%20more%20time%20on%20it.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-64298%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-64298%22%20slang%3D%22en-US%22%3EI%20understand%20your%20frustration%20(same%20here%20sometimes).%3CBR%20%2F%3EI%20know%20is%20tedious%2C%20but%2C%20can%20you%20try%20the%20same%20in%20another%20machine%20without%20the%20spfx%20%2F%20npm%20%2F%20gulp%20installed%3F%3CBR%20%2F%3EOne%20of%20the%20issues%20I%20had%20since%20I%20started%20with%20RC1%2C%20was%20very%20weird%2C%20and%20the%20solution%20was%20reinstall%20the%20spfx%20again%20(something%20was%20corrupted%2C%20and%20the%20build%20process%20didn't%20include%20some%20of%20the%20needed%20assets).%3CBR%20%2F%3EI%20don't%20know%20what%20else%20advise%2C%20but%20I'd%20try%20on%20another%20machine.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-64080%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-64080%22%20slang%3D%22en-US%22%3E%3CP%3ELuis%2C%20thanks%20for%20all%20your%20help%20and%20advice.%20%26nbsp%3BI%20have%20already%20done%20all%20the%20sample%20projects%20you%20reference%20(they%20all%20work%20as%20expected%20and%20are%20lovely)%20and%20am%20now%20trying%20to%20do%20something%20%22meaningful%20and%20on%20my%20own%22%20which%20is%20where%20I%20am%20running%20into%20all%20these%20problems.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26gt%3B%26gt%3B%3CEM%3EYou're%20right.%20it%20should%20work%20without%20the%20Externals%20config%2C%20as%20by%20default%2C%20all%20dependencies%20should%20be%20bundle.%20However%2C%20keep%20in%20mind%20that%20is%20not%20a%20good%20idea%20to%20bundle%20%22external%22%20libraries%20like%20jQuery%2C%20PnP%2C%20etc%2C%20because%20they%20will%20be%20bundle%20per%20each%20webpart%20in%20the%20project%2C%20so%2C%20if%20you%20have%20different%20webparts%20using%20jQuery%2C%20jQuery%20will%20be%20bundle%20in%20each%20webpart%3C%2FEM%3E%26lt%3B%26lt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'd%20read%20that%20before%2C%20so%20yes%20I%20am%20aware%20that%20in%20real-world%20circumstances%20I%20would%20want%20to%20exclude%20them%20from%20the%20bundle.%20%26nbsp%3BThis%20is%20just%20me%20trying%20to%20get%20going%2C%20I%20will%20worry%20about%20generating%20%22production%20ready%22%20code%20and%20configurations%20when%20I%20get%20this%20all%20working!%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFirst%20of%20all%2C%20adding%20to%20the%20externals%20did%20nothing%20to%20fix%20the%20issue%20I%20was%20having%20of%20the%20library%20not%20being%20found.%20%26nbsp%3BI%20tried%20a%20bunch%20of%20different%20ways%20to%20address%20it%20and%20nothing%20seemed%20to%20work.%20%26nbsp%3B%3CEM%3EThe%20only%20thing%20that%20did%20work%20was%20explicitly%20npm%20uninstalling%20both%20the%20jquery%20and%20pnp%20libraries%2C%20and%20then%20installing%20them%20again%3C%2FEM%3E%20in%20this%20order%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ejquery%3C%2FP%3E%3CP%3E%40types%2Fjquery%3C%2FP%3E%3CP%3Etypings%3C%2FP%3E%3CP%3Esp-pnp-js%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20doing%20that%2C%20the%20code%20would%20transpile%20and%20I%20was%20able%20to%20run%20in%20the%20local%20workbench.%20%26nbsp%3BWhen%20I%20tried%20the%20SPOnline%20workbench%2C%20the%20web%20part%20showed%20up%20but%20the%20%22pencil%22%20icon%20would%20not%20give%20me%20the%20properties%20panel%20--%20clicking%20it%20did%20nothing.%20%26nbsp%3BProblematic%20since%20the%20content%20to%20be%20displayed%20on%20the%20web%20part%20relies%20on%20a%20property%20setting%20to%20filter%20which%20list%20items%20to%20return%20and%20display.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26gt%3B%26gt%3B%3CEM%3EI%20follow%20your%20instructions%20and%20is%20working%20fine%20for%20me%3C%2FEM%3E%26lt%3B%26lt%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWish%20I%20could%20say%20the%20same.%20%26nbsp%3B%20Of%20course%2C%20%22Well%2C%20it%20works%20ok%20on%20MY%20machine...%22%20is%20one%20I've%20had%20to%20tell%20my%20clients%20a%20time%20or%20two%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20work%20I%20shut%20down%20for%20the%20evening%2C%20and%20when%20I%20logged%20in%20again%20today%20and%20opened%20my%20project%20folder%20and%20did%20a%20simple%20gulp%20serve%2C%20I%20got%20the%20same%20%22sp-pnp-js%22%20not%20found%20that%20I%20got%20yesterday%20before%20I%20uninstalled%20and%20reinstalled%20everything.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20957px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F13590i88625458F2BEA0CD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22cannotfindmodule.JPG%22%20title%3D%22cannotfindmodule.JPG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ECannot%20Find%20Module%20errors%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ESo%20I%20am%20back%20to%20where%20I%20was%20yesterday%2C%20unless%20I%20want%20to%20uninstall%20and%20reinstall%20all%20of%20the%20libraries%20again.%20Obviously%20not%20something%20I%20should%20have%20to%20do%20every%20day%20I%20work%20on%20this%20stuff%2C%20so%20something%20is%20still%20very%20wrong%20in%20my%20environment.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20to%20be%20SO%20good%20at%20full%20trust%20solution%20web%20parts...*sigh*%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20version%20numbers%20in%20the%20package.json%20(attached)%20are%20very%20similar%20to%20yours.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-63871%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-63871%22%20slang%3D%22en-US%22%3E%3CP%3EHo%20Joseph%2C%3C%2FP%3E%3CP%3Esome%20comments%3A%3C%2FP%3E%3CUL%3E%3CLI%3EYou're%20right.%20it%20should%20work%20without%20the%20Externals%20config%2C%20as%20by%20default%2C%20all%20dependencies%20should%20be%20bundle.%20However%2C%20keep%20in%20mind%20that%20is%20not%20a%20good%20idea%20to%20bundle%20%22external%22%20libraries%20like%20jQuery%2C%20PnP%2C%20etc%2C%20because%20they%20will%20be%20bundle%20per%20each%20webpart%20in%20the%20project%2C%20so%2C%20if%20you%20have%20different%20webparts%20using%20jQuery%2C%20jQuery%20will%20be%20bundle%20in%20each%20webpart%2C%20and%20if%20you%20have%20a%20page%20with%202%20of%20your%20webparts%2C%20you're%20loading%20jquery%20twice.%3C%2FLI%3E%3CLI%3EFunny%20thing%20is%20that%20I%20promise%20that%20I%20follow%20your%20instructions%20and%20is%20working%20fine%20for%20me.%20I've%20been%20able%20to%20load%20the%20Web%20Title%20using%20PnP%20JS%2C%20so%20review%20your%20versions%20of%20the%20packages%20(attached%20is%20my%20packages.json%20file).%3C%2FLI%3E%3CLI%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F13566iD9C60CE18ECDEC66%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22pnp%20web%20title%20spfx%20webpart.PNG%22%20title%3D%22pnp%20web%20title%20spfx%20webpart.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3EI%20guess%20doc%20is%20not%20perfect%2C%20but%20is%20quite%20good%20in%20general.%20I%20suggest%20that%20you%20start%20following%20the%20get%20started%20section%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdev.office.com%2Fsharepoint%2Fdocs%2Fspfx%2Fweb-parts%2Fget-started%2Fbuild-a-hello-world-web-part%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdev.office.com%2Fsharepoint%2Fdocs%2Fspfx%2Fweb-parts%2Fget-started%2Fbuild-a-hello-world-web-part%3C%2FA%3E%3C%2FLI%3E%3CLI%3EAlso%20this%20post%20is%20good%20about%20using%20PnP%20JS%20inside%20spfx%3A%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fwww.ktskumar.com%2F2016%2F08%2Fgetting-started-sharepoint-framework-using-pnp-js-library%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.ktskumar.com%2F2016%2F08%2Fgetting-started-sharepoint-framework-using-pnp-js-library%2F%3C%2FA%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EHope%20it%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-63633%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-63633%22%20slang%3D%22en-US%22%3E%3CP%3ELuis%2C%20thanks%20so%20much.%20%26nbsp%3BI%20will%20try%20this%20out%20and%20post%20back%20here%20with%20my%20results.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20guess%20my%20follow-up%20question%20(assuming%20this%20works)%20is%20why%20do%20I%20have%20to%20do%20this%20with%20sp-pnp-js%20and%20not%20with%20jQuery%3F%20%26nbsp%3BI%20used%20npm%20to%20install%20them%20both%20in%20%26nbsp%3Bfairly%20identical%20fashion%2C%20and%20jQuery%20in%20the%20project%20%22just%20works%22%20without%20any%20further%20monkeying%20with%20any%20kind%20of%20config%20files.%20%26nbsp%3BWhy%20does%20that%20work%20and%20sp-pnp-js%20not%3F%20%26nbsp%3BSeems%20odd%20to%20me.%20%26nbsp%3BAnd%20if%20this%20is%20required%2C%20why%20is%20it%20not%20mentioned%20on%20that%20first%20page%20of%20the%20%22getting%20started%22%20part%20of%20the%20wiki%20developers%20guide%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPerhaps%20I%20am%20being%20naive%20because%20this%20is%20all%20so%20new%20to%20me%2C%20but%20it%20seems%20like%20this%20is%20pretty%20fundamental%20to%20people%20learning%20the%20new%20way%20of%20doing%20things.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-63502%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20with%20jquery%20%26amp%3B%20sp-pnp-js%3A%20definitive%20project%20start%20activity%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-63502%22%20slang%3D%22en-US%22%3EI%20think%20the%20issue%20is%20because%20you%20have%20to%20tell%20spfx%20that%20you%20are%20using%20an%20external%20library%20%22sp-pnp-js%22%2C%20and%20where%20is%20located.%20This%20is%20done%20in%20the%20config.json%20file%2C%20like%20(edit%20your%20path)%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%22externals%22%3A%20%7B%3CBR%20%2F%3E%22sp-pnp-js%22%3A%20%22.......%2Fnode_modules%2Fsp-pnp-js%2F2.0.1%2Fpnp.min.js%22%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%3CBR%20%2F%3EAlso%2C%20here%20you%20can%20find%20a%20sample%20using%20PnP%20JS%20library%20(also%20with%20KnockoutJS)%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-fx-webparts%2Ftree%2Fmaster%2Fsamples%2Fknockout-sp-pnp-js%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-fx-webparts%2Ftree%2Fmaster%2Fsamples%2Fknockout-sp-pnp-js%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3Eand%20here%20there's%20a%20sample%20using%20jQuery%20library%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-fx-webparts%2Ftree%2Fmaster%2Fsamples%2Fjquery-cdn%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-fx-webparts%2Ftree%2Fmaster%2Fsamples%2Fjquery-cdn%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3Emixing%20both%20samples%2C%20you%20should%20be%20able%20to%20get%20what%20you're%20looking%20for.%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Sorry if this seems like a basic question, but I am an absolute beginner with all the new tooling and language stuff around SPFx development.  What are the steps to start a new web part that will use jQuery and sp-pnp-js and test on my sp-online dev tennant?  So far, what I can tell is I have to do this:

 

* create a new folder and navigate to it in the PS shell

* >yo @microsoft/SharePoint

* >gulp trust-dev-cert

* >npm install jquery -- save

* >npm install @types/jquery --save

* >npm install sp-pnp-js --save

 

Then, to the top of the webpart.ts file  I add import statements:

import pnp from "sp-pnp-js";
import "jquery";

 

At this point I should be able to do a "gulp serve" and see the default generated web part in the local workbench.  Unfortunately the pnp library gets a red-squiggle underline and the gulp serve output complains about "unused imports".  Can someone point me to what I am missing?

 

And can a simple "recipe" like I have above be added to the documentation somewhere so doofus newbies like me don't have to come and bother you good folks just to get started? ;)

 

Thanks

 

 

20 Replies
Highlighted
I think the issue is because you have to tell spfx that you are using an external library "sp-pnp-js", and where is located. This is done in the config.json file, like (edit your path):

"externals": {
"sp-pnp-js": "......./node_modules/sp-pnp-js/2.0.1/pnp.min.js"
},

Also, here you can find a sample using PnP JS library (also with KnockoutJS):
https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/knockout-sp-pnp-js

and here there's a sample using jQuery library:
https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/jquery-cdn

mixing both samples, you should be able to get what you're looking for.
Highlighted

Luis, thanks so much.  I will try this out and post back here with my results.

 

I guess my follow-up question (assuming this works) is why do I have to do this with sp-pnp-js and not with jQuery?  I used npm to install them both in  fairly identical fashion, and jQuery in the project "just works" without any further monkeying with any kind of config files.  Why does that work and sp-pnp-js not?  Seems odd to me.  And if this is required, why is it not mentioned on that first page of the "getting started" part of the wiki developers guide?

 

Perhaps I am being naive because this is all so new to me, but it seems like this is pretty fundamental to people learning the new way of doing things.

 

Thanks again!

 

 

Highlighted

Ho Joseph,

some comments:

  • You're right. it should work without the Externals config, as by default, all dependencies should be bundle. However, keep in mind that is not a good idea to bundle "external" libraries like jQuery, PnP, etc, because they will be bundle per each webpart in the project, so, if you have different webparts using jQuery, jQuery will be bundle in each webpart, and if you have a page with 2 of your webparts, you're loading jquery twice.
  • Funny thing is that I promise that I follow your instructions and is working fine for me. I've been able to load the Web Title using PnP JS, so review your versions of the packages (attached is my packages.json file).
  • pnp web title spfx webpart.PNG
  • I guess doc is not perfect, but is quite good in general. I suggest that you start following the get started section here: https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/build-a-hello-world-web-part
  • Also this post is good about using PnP JS inside spfx: http://www.ktskumar.com/2016/08/getting-started-sharepoint-framework-using-pnp-js-library/

Hope it helps.

Highlighted

Luis, thanks for all your help and advice.  I have already done all the sample projects you reference (they all work as expected and are lovely) and am now trying to do something "meaningful and on my own" which is where I am running into all these problems.

 

>>You're right. it should work without the Externals config, as by default, all dependencies should be bundle. However, keep in mind that is not a good idea to bundle "external" libraries like jQuery, PnP, etc, because they will be bundle per each webpart in the project, so, if you have different webparts using jQuery, jQuery will be bundle in each webpart<<

 

I'd read that before, so yes I am aware that in real-world circumstances I would want to exclude them from the bundle.  This is just me trying to get going, I will worry about generating "production ready" code and configurations when I get this all working! :)

 

First of all, adding to the externals did nothing to fix the issue I was having of the library not being found.  I tried a bunch of different ways to address it and nothing seemed to work.  The only thing that did work was explicitly npm uninstalling both the jquery and pnp libraries, and then installing them again in this order:

 

jquery

@types/jquery

typings

sp-pnp-js

 

After doing that, the code would transpile and I was able to run in the local workbench.  When I tried the SPOnline workbench, the web part showed up but the "pencil" icon would not give me the properties panel -- clicking it did nothing.  Problematic since the content to be displayed on the web part relies on a property setting to filter which list items to return and display.

 

>>I follow your instructions and is working fine for me<< 

 

Wish I could say the same.   Of course, "Well, it works ok on MY machine..." is one I've had to tell my clients a time or two :)

 

After work I shut down for the evening, and when I logged in again today and opened my project folder and did a simple gulp serve, I got the same "sp-pnp-js" not found that I got yesterday before I uninstalled and reinstalled everything.

 

Cannot Find Module errorsCannot Find Module errors

So I am back to where I was yesterday, unless I want to uninstall and reinstall all of the libraries again. Obviously not something I should have to do every day I work on this stuff, so something is still very wrong in my environment.

 

I used to be SO good at full trust solution web parts...*sigh*

 

My version numbers in the package.json (attached) are very similar to yours.

 

Highlighted
I understand your frustration (same here sometimes).
I know is tedious, but, can you try the same in another machine without the spfx / npm / gulp installed?
One of the issues I had since I started with RC1, was very weird, and the solution was reinstall the spfx again (something was corrupted, and the build process didn't include some of the needed assets).
I don't know what else advise, but I'd try on another machine.
Highlighted

>>I know is tedious, but, can you try the same in another machine without the spfx / npm / gulp installed?<<

 

I understand the value of that process, but unfortunately that's not possible -- I'm a remote consultant at the moment without access to a corporate environment where there might be other machines available for me to test on.  Additionally, my task is to create an SPFx web part, so getting sp-pnp-js to work without all that stuff would be instructive, but not really helpful since it's what I am actually trying to achieve.  I'll have to abandon PnP before SPFx if it comes down to it.

 

I had hoped to be able get around all the SP REST plumbing and simplify my code with PnP.  But if it becomes more work than what it is supposed to replace, there's really no point in pursuing it.  If I can't get this going today, it's just going to have to go away because I can't justify wasting any more time on it. 

Highlighted

Thanks for the mention @Dean... to be fair that starter bundle only covers the getting started part of SPFx... not building anything... just (1) understanding what SPFx is & (2) how to get the dev toolchain setup.

Highlighted

Dean,

 

Thanks for the reference.  I have actually already signed up at Voitano for the bundle and have watched some of the content already.  Also worked through the 6 or 7 lessons on the MS getting started web site.  Getting SPFx to work hasn't actually been the issue here.  I want to make it clear to everyone who cares to read this thread:

 

The problem is integrating sp-pnp-js

 

I've done several "sample" type "build your first SPFx web part" projects and have had no problem with anything not working as it is supposed to.

 

The issue I get is that even after following the advice in the PnP JS github repo, I still get a "red squiggly" under "sp-pnp-js" in the code editor and errors in the gulp response as illustrated in one of the earlier posts in this thread. Apparently TS is not finding the PnP, and I just don't see why not because I have done everything I was told to do.  It works for jQuery.  It does not work for sp-pnp-js (unless, as I stated above, I first uninstall and then reinstall everything -- which I have to do every day I boot up to work on this thing).

 

I just want to get this fixed so I can move on to the real work of solving my customer's business issues instead of figuring out why my editor/compiler can't find something.  If anyone can help me help my compiler find the "sp-pnp-js" library I would be extremely grateful.  Thanks again.

Highlighted

I'll take a look and see if I can't get you sorted. Can you share the project somewhere? Ideally, remove the node_modules folder... pushing to a github public repo & sending the URL will be perfect.

Highlighted

Thanks for your kind offer, Andrew.  (Looking forward to the new Voitanos content, btw)

 

You can find it here:

 

https://github.com/acksoft/QuickLinks

Highlighted
Best Response confirmed by Joseph Ackerman (Contributor)
Solution

Hi Joseph,
I've cloned your repo, then npm install, and then gulp serve, and has worked fine on my machine (hate to say that, but it's true). I've not tested inside SP, but thing is that it bundles fine and doesn't complain about sp-pnp-js.

 

Capture.PNG

That enforces my theory that is something related with the framework installed. Did you try to re-install the entire spfx?

 

npm uninstall -g @microsoft/generator-sharepoint

npm install -g @microsoft/generator-sharepoint@latest

Highlighted

Will try it.  Thanks Luis.

Highlighted


>>my theory that is something related with the framework installed. Did you try to re-install the entire spfx?<<

 

I started fresh and reinstalled everything, and now plain vanilla gulp serve with just the imports statements for the jquery and sp-pnp-js libraries seems to be working.  Good call on the reinstall of the SPFx.

 

Of course now I've got some other issues...but that needs to be its own thread ;)

 

Thanks for your help.

Highlighted

Well, looks like we are back to square one.  I am getting the red squiggly and the "sp-pnp-js" not found again.  Friday afternoon, everything was just fine as I mentioned in my last post but rebooting my machine today I got this:

 

PS C:\projects\quicklinks> gulp serve
Build target: DEBUG
[18:04:09] Using gulpfile C:\projects\quicklinks\gulpfile.js
[18:04:09] Task 'C:\Users\joseph_ackerman\AppData\Roaming\npm\gulp.cmd' is not in your gulpfile
[18:04:09] Please check the documentation for proper gulpfile formatting
[18:04:09] Task 'C:\Users\joseph_ackerman\AppData\Roaming\npm\gulp.cmd' is not in your gulpfile
[18:04:09] Please check the documentation for proper gulpfile formatting
About to exit with code: 1
Process terminated before summary could be written, possible error in async code not continuing!
Trying to exit with exit code 1

 

Then two minutes later, I tried again and instead of that response, I got the old one that is embedded as an image above in this thread with these:

 

[18:21:53] Error - typescript - src\webparts\quicklinks\QuicklinksWebPart.ts(21,16): error TS2307: Cannot find module 'sp-pnp-js'.

 

I am left thinking only that my boot up sequence is somehow breaking the tool chain.  Being new to all of this new CLI stuff (the old ones I understood and wrote many C and Clipper programs back in the 80's),  I haven't the faintest idea what to do next.  Very frustrating.  I can't even express how much I hate this.  When I build SP Add-ins with Visual Studio and NuGet, it just *works*.  Starting every work day with a new "WTF?" moment is no fun.

 

This new process is too fragile: too many vendors, too many interlocking tools expecting to much of each other's output, not enough *specific* error information when things fail.  I committed to the Microsoft stack back in the early 90's because they had the best tools and superior documentation (at the time, Visual Basic was *awesome*).  Now it's "Use these 5 other things and if it doesn't work, tough". Sorry for the rant, but this is crazy-making.  Thanks for listening.

Highlighted

I understand the frustration, but your characterization at the end isn't really fair. I'm not a fan of the huge dependency tree or at least the way they've rolled it out today (NPM shrinkwrap would have been better... or dependency tree that isn't nearly as big).

 

We've dealt with this before... I recall SharePoint developers waking up only to have COM+ issues happen seemingly overnight for no reason.

 

Question: did you use the repo that someone created above to get the error?

 

Can you run the following at the command line and paste the results for each one?

 

node -v
npm -v
npm list -g --depth=0
Highlighted

>>I understand the frustration, but your characterization at the end isn't really fair<<

Yeah, I'm really good at being unfair when I get frustrated.  Sorry 'bout that ;)

 

>>We've dealt with this before...<<

I hear what you're saying, but as far as I can see that's all the more reason we shouldn't have to deal with it again. Completely re-architecting the customizations platform every three years is not a recipe for engendering developer good-will.

 

And I'm not alone here: I have a colleague who left SP development all-together when everything went remote in late 2012 -- he was upset that the very robust application platform he had used to build amazing solutions was being deprecated because so many in the coding community couldn't manage to write web parts that didn't crash their servers (nested using(){} blocks and the occasional web.dispose() were our best friends).  

 

I've stuck it out hoping things would get better, and they have somewhat, but my current opinion based on 30 years of work in the industry is that this feels a lot like the introduction of Java in '96: everyone's excited about it but it's under-baked and not really ready for prime-time.  I will be *thrilled* to be proven wrong.

 

>>did you use the repo that someone created above to get the error?<<

That repo is my project (sans the node_modules branch, per your request above) in whatever state it was in on the day the repo was created.

 

>>Can you run the following<<

Sure, and here are the results:

PS C:\projects\quicklinks> node -v
v6.10.2
PS C:\projects\quicklinks> npm -v
3.10.10
PS C:\projects\quicklinks> npm list -g --depth=0
C:\Users\joseph_ackerman\AppData\Roaming\npm
+-- @microsoft/generator-sharepoint@1.0.2
+-- gulp@3.9.1
`-- yo@1.8.5

 

Thanks for chiming in.  Hope this info points to something.  Given that I can see that my <user>\appdata\roaming folder is somehow involved, is it possible that some special path configuration is getting set by npm when I install other libraries but is not getting saved  (or is getting removed) so that it is not picked up when I reboot?

 

Footnote: Interestingly, I had a three-hour screen share session with another developer on my team yesterday just to put another pair of eyes on it, and he and I went through the process of setting up his machine for SPFx development.  He built his first web part no problem, just like me. Added jquery and sp-pnp-js just like me.  Everything went fine, just like me.  He then rebooted his machine and went back to the project folder and did a gulp serve, and got the "sp-pnp-js not found" error. Unfortunately, just like me.

Highlighted

Further testing has turned up some interesting facts:

 

The colleague who tested this with me on Monday and had the same issues as I did on his corporate-issued development box, went through the process again on a different machine, his own personal gaming box running Windows 10.  On that box, it worked perfectly, even after a reboot.  So: non-corporate image running W10 -- OK.

 

My next thought was to test on a non-corporate image W7 box.  It occured to me (belatedly, duh) that I was under-utilizing my free Azure allocation, so I created a clean new W7 VM and installed all the tooling and libraries there.  Amazingly, everything worked as it should, including the integration of the additional jquery and sp-pnp-js, even after a reboot. So: non-corporate image running W7 -- OK.

 

Given that the troubles both of us had were on our corporate-imaged/managed laptops, and given the fact that the diagnostics you asked for revealed this:

 

PS C:\projects\quicklinks> npm list -g --depth=0
C:\Users\joseph_ackerman\AppData\Roaming\npm
+-- @microsoft/generator-sharepoint@1.0.2
+-- gulp@3.9.1
`-- yo@1.8.5

 

I have concluded that there must be some IT-mandated configuration of our security software, or perhaps some sort of enforced Windows policy, that does not like something it is finding in that appdata\roaming\npm path.  If npm is putting .JS or .JSON files somewhere down that tree, it may be that my system configuration (as enforced by my company) sees those files as a threat and is removing or renaming them. That feels like a very plausible theory for the behavior I and my colleague have been experiencing.

 

I'm tired of researching this instead of learning how to actually use SPFx and sp-pnp-js, so rather than taking on Corporate IT Don Quixote-style and trying to make an exception for me and my team, it looks like my SPFx work will be in that Azure VM for the time being.  I just have to remember to stop the instance running when I finish my work day!

 

Thanks for your help and interest (and to everyone who contributed).  On to my next challenge!

Highlighted
Hi Joseph,
yeah, I also suspected some IT stuff, as worked on my PC too. Anyway, the azure VM is a good idea. About stopping the VM, I think there's an auto-shutdown machine option from the portal (at least with VMs using Resource Manager, not sure about "classic" Azure VMs)

https://azure.microsoft.com/es-es/blog/announcing-auto-shutdown-for-vms-using-azure-resource-manager...