microsoft / ado-npm-auth

This package can automatically use the azureauth CLI to fetch tokens and update a user's .npmrc file for authenticating to Azure DevOps npm feeds.
MIT License
9 stars 7 forks source link

"The resource cannot be found" error on running #11

Open sethreidnz opened 4 months ago

sethreidnz commented 4 months ago

I've followed the instructions in the readme and when I run:

npm exec ado-npm-auth

I get the following error

undefined:1
The resource cannot be found.
^

SyntaxError: Unexpected token 'T', "The resour"... is not valid JSON
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> ({REDACTED}/node_modules/ado-npm-auth/dist/ado-npm-auth.cjs:38253:37)
    at IncomingMessage.emit (node:events:526:35)
    at endReadableNT (node:internal/streams/readable:1589:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

I then found this https://github.com/microsoft/ado-npm-auth/pull/5 and tried the command:

npm exec ado-npm-auth -- --skip-check

Which got me further but then I still get:

Encountered error while performing auth Error: AzureAuth is not installed.

System settings

thsparks commented 3 weeks ago

edit: I realized my error is more likely releated to https://github.com/microsoft/ado-npm-auth/issues/13, so I'll follow up there instead.

I'm also seeing the "AzureAuth is not installed." error when running on WSL:

System Settings

Node version - v18.20.4 Npm version - 10.7.0 WSL - 5.15.153.1-microsoft-standard-wsl2