node-sp-auth
node-sp-auth copied to clipboard
Getting an error during npm run publish
Hi,
I have hit an error during my Azure Pipline deployment and cannot seem to resolve. I apologise in advance if this is the wrong place but it seems to be trigger druing IsOnPremUrl. Below is the error that I encounter:
Unhandled rejection TypeError: Cannot read property 'indexOf' of null
at isOnPremUrl (C:\agent_work\2\s\node_modules\node-sp-auth\lib\src\auth\IAuthOptions.js:6:17)
at Object.isTmgCredentialsOnpremise (C:\agent_work\2\s\node_modules\node-sp-auth\lib\src\auth\IAuthOptions.js:41:20)
at Function.resolve (C:\agent_work\2\s\node_modules\node-sp-auth\lib\src\auth\AuthResolverFactory.js:18:25)
at Object.getAuth (C:\agent_work\2\s\node_modules\node-sp-auth\lib\src\index.js:8:54)
at C:\agent_work\2\s\node_modules\sp-request\lib\src\core\SPRequest.js:40:20
at coreRequest (C:\agent_work\2\s\node_modules\sp-request\lib\src\core\SPRequest.js:22:16)
at spRequestFunc (C:\agent_work\2\s\node_modules\sp-request\lib\src\core\SPRequest.js:69:20)
at Function.spRequestFunc.(anonymous function) [as get] (C:\agent_work\2\s\node_modules\sp-request\lib\src\core\SPRequest.js:109:24)
at C:\agent_work\2\s\node_modules\sp-build-tasks\dist\utils\files.js:82:31
at new Promise (
[20:16:58] The following tasks did not complete: push [20:16:58] Did you forget to signal async completion?
I need some help to get some direction on how to solve this problem.
Do let me know if there are another information I can provide.
Thank you.
Hi,
most likely you haven't passed the site url in your pipeline, or you use wrong configuration options. I would check that the parameters, passing to node-sp-auth are valid.
Hi,
Thank you so much for the direction. It seems to work after I ran gulp config --init manually. But still having issue when I use azure dev ops pipline.