You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot npm install packages that were pushed on a custom domain repository (401 Unauthorized) #97
Okay, I think i finally sorted this out.
If you create a repository then operate a custom domain on it, it seems that packages you push on it (using the custom domain url) will give a 401 error when pulled later on (through npm install/yarn add)
Additional Data
Removing the "authorizer: authorizerGithub" on the target.default handler will remove auth checking from the lambda function. It seems to work correctly after that.
But well, as a drawback everyone can now install your packages given the registry and name.
NPM CLI version you are using: npm 5.5.1, yarn 1.3.2
changed the title [-]Published package can't be installed with yarn[/-][+]Cannot npm install / yarn add packages that contains .css files[/+]on Nov 20, 2017
changed the title [-]Cannot npm install / yarn add packages that contains .css files[/-][+]Cannot npm install packages that were pushed on a custom domain repository[/+]on Nov 21, 2017
changed the title [-]Cannot npm install packages that were pushed on a custom domain repository[/-][+]Cannot npm install packages that were pushed on a custom domain repository (401 Unauthorized)[/+]on Nov 21, 2017
@snajjar I had the same issue and you have to run the command listed here: https://github.com/craftship/codebox-npm#custom-domain. What you are missing is that this command changes the apiEndpoint environment variable on the codebox-npm-${stage}-put Lambda function. You can do it manually if needed.
Also I looked into the code and if you don't have the stage name on your custom domain (so customdomain.com instead of e.g. customdomain.com/prod), then the command is probably going to set the apiEndpoint wrongly, so you have to correct it manually.
Activity
[-]Published package can't be installed with yarn[/-][+]Cannot npm install / yarn add packages that contains .css files[/+][-]Cannot npm install / yarn add packages that contains .css files[/-][+]Cannot npm install packages that were pushed on a custom domain repository[/+][-]Cannot npm install packages that were pushed on a custom domain repository[/-][+]Cannot npm install packages that were pushed on a custom domain repository (401 Unauthorized)[/+]bandesz commentedon Feb 4, 2018
@snajjar I had the same issue and you have to run the command listed here: https://github.com/craftship/codebox-npm#custom-domain. What you are missing is that this command changes the apiEndpoint environment variable on the codebox-npm-${stage}-put Lambda function. You can do it manually if needed.
Also I looked into the code and if you don't have the stage name on your custom domain (so customdomain.com instead of e.g. customdomain.com/prod), then the command is probably going to set the apiEndpoint wrongly, so you have to correct it manually.