Forum Discussion
Joseph Ackerman
Apr 19, 2017Iron Contributor
SPFx with jquery & sp-pnp-js: definitive project start activity?
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...
- Apr 27, 2017
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.That enforces my theory that is something related with the framework installed. Did you try to re-install the entire spfx?
npm uninstall -g Pernille-Eskebo/generator-sharepoint
npm install -g Pernille-Eskebo/generator-sharepoint@latest
Dean_Gross
Apr 25, 2017Silver Contributor
Andrew Connell has a starter kit that you may find helpful, see http://www.andrewconnell.com/blog/now-available-mastering-the-sharepoint-framework-starter-bundle
- Joseph AckermanApr 25, 2017Iron Contributor
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.
- Apr 25, 2017
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.
- Joseph AckermanApr 25, 2017Iron Contributor
Thanks for your kind offer, Andrew. (Looking forward to the new Voitanos content, btw)
You can find it here:
- Apr 25, 2017
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.