SharepointPlus ($SP) is a JavaScript library which offers some extended features for SharePoint entirely on client side (requires no server install). $SP will simplify your interactions with Sharepoint.
but I'm getting the following error, which kind of makes sense because I'm not in a browser when calling it. Is there a way to bypass this that I didn't see in the documentation ?
(node:604093) UnhandledPromiseRejectionWarning: ReferenceError: window is not defined
at SharepointPlus._callee$ (/usr/src/build/node_modules/sharepointplus/dist/utils/getURL.js:49:13)
at tryCatch (/usr/src/build/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/usr/src/build/node_modules/regenerator-runtime/runtime.js:294:22)
at Generator.next (/usr/src/build/node_modules/regenerator-runtime/runtime.js:119:21)
at asyncGeneratorStep (/usr/src/build/node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js:5:24)
at _next (/usr/src/build/node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js:27:9)
at /usr/src/build/node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js:34:7
at new Promise (<anonymous>)
at new Wrapper (/usr/src/build/node_modules/core-js-pure/internals/export.js:18:24)
at SharepointPlus.<anonymous> (/usr/src/build/node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js:23:12)
(node:604093) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)
Hello !
I'm trying to get the list of all the sharepoint lists of a website from Node.js like this :
but I'm getting the following error, which kind of makes sense because I'm not in a browser when calling it. Is there a way to bypass this that I didn't see in the documentation ?
Thanks a lot !