node-sp-auth icon indicating copy to clipboard operation
node-sp-auth copied to clipboard

Getting an error during npm run publish

Open alexleely opened this issue 5 years ago • 2 comments
trafficstars

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 () at Files.getServerRelativeUrl (C:\agent_work\2\s\node_modules\sp-build-tasks\dist\utils\files.js:76:20) at Files.getFiles (C:\agent_work\2\s\node_modules\sp-build-tasks\dist\utils\files.js:97:26) at C:\agent_work\2\s\node_modules\sp-build-tasks\dist\tasks\sync.js:101:42 at step (C:\agent_work\2\s\node_modules\sp-build-tasks\dist\tasks\sync.js:33:23) at Object.next (C:\agent_work\2\s\node_modules\sp-build-tasks\dist\tasks\sync.js:14:53) at fulfilled (C:\agent_work\2\s\node_modules\sp-build-tasks\dist\tasks\sync.js:5:58) at process._tickCallback (internal/process/next_tick.js:68:7)

[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.

alexleely avatar Jun 16 '20 12:06 alexleely

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.

s-KaiNet avatar Jun 16 '20 12:06 s-KaiNet

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.

alexleely avatar Jun 17 '20 23:06 alexleely