Sep 05 2016 08:50 AM
I have been trying to get @SPDoctor's SiteInfo web part working with SPFx framework. One of the dependencies is sp-pnp-js. I get failures when I try and compile the webpart with gulp serve :-
'typings' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 10.0.14915
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\XXXX\\YYYY\\ZZZZ\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "sp-pnp-js" "--save"
npm ERR! node v4.5.0
npm ERR! npm v3.10.7
npm ERR! code ELIFECYCLE
npm ERR! sp-pnp-js@1.0.4 postinstall: `typings install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sp-pnp-js@1.0.4 postinstall script 'typings install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sp-pnp-js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sp-pnp-js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sp-pnp-js
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\XXXX\YYYY\ZZZZ\Documents\SPFx\Projects\npm-debug.log
Anybody Ideas ??
Thanks
Nigel
Sep 06 2016 04:22 AM
Hi
I finally got this to work by doing the following :-
npm install typings -g
which fixed the first problem and the I got "cannot find module 'sp-pnp-js'@ error
I tried npm install -g sp-pnp-js --save
That did not work.
But npm install --save sp-pnp-js did work !!
Regards
Nigel
Oct 08 2016 12:54 PM
Hi,
In the worst scenario
npm cache clean npm install typings -g npm install sp-pnp-js --save