-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azureauth postinstall script - scripts/install.js is not working correctly in wsl #13
Comments
This might be related to the bug I've fixed here: #15 which was causing the error thrown to be irrelevant. |
This is happening in Windows Subsystem for Linux. process.platform is being resolved as linux and the respective flows are commented out in scripts/install.js
|
@jcreamer898, it would be great if you could help me with this. Thanks! |
Hey @sivakumarmedidi the issue is that the underlying library doesn't have a release for linux yet. On WSL, you can get away with using the Windows .exe, and I noticed this behaviour too. Also confusingly there's two places that do basically the same thing of running underlying azureauth, so I'm going to try and consolidate this. Stay tuned for the fix for WSL |
This is also happening when using It would be great if npm wasn't hard-coded in the |
I'm also seeing the "AzureAuth is not installed" error when running on WSL:
@Stuart-Wilcox , you mentioned "On WSL, you can get away with using the Windows .exe". Can you elaborate on how you got that working? I see a check that looks like it would handle this automatically in the line below, but I'm still seeing the error. Not sure if there's a step I need to run beforehand to ensure it's available here. I tried just installing azureauth in Windows but it didn't seem to have an effect.
System SettingsNode version - v18.20.4 |
Ah, I was able to get the windows.exe workaround working by following the azureauth windows install instructions found here: https://github.com/AzureAD/microsoft-authentication-cli?tab=readme-ov-file#windows. Previously, I had just been using npm to install it in windows. |
🔑 Authenticating to package feed...
Encountered error while performing auth Error: AzureAuth is not installed.
at adoPat (.nvm/versions/node/v20.12.2/lib/node_modules/ado-npm-auth/dist/ado-npm-auth.cjs:38644:19)
at async generateNpmrcPat (.nvm/versions/node/v20.12.2/lib/node_modules/ado-npm-auth/dist/ado-npm-auth.cjs:38659:17)
at async setNpmrcPat (.nvm/versions/node/v20.12.2/lib/node_modules/ado-npm-auth/dist/ado-npm-auth.cjs:38783:51)
at async run (.nvm/versions/node/v20.12.2/lib/node_modules/ado-npm-auth/dist/ado-npm-auth.cjs:38122:9)
at async.nvm/versions/node/v20.12.2/lib/node_modules/ado-npm-auth/dist/ado-npm-auth.cjs:38145:16
❌ Authentication to package feed failed.
The azureauth executable which is supposed to be downloaded and installed via postinstall script for azureauth package is not installed correctly in wsl. So, seeing this error. Can this be fixed please?
The text was updated successfully, but these errors were encountered: