Skip to content
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

cannot build due to private github package #1

Closed
ch1y1z1 opened this issue Oct 7, 2024 · 5 comments
Closed

cannot build due to private github package #1

ch1y1z1 opened this issue Oct 7, 2024 · 5 comments

Comments

@ch1y1z1
Copy link

ch1y1z1 commented Oct 7, 2024

installing dependency got error:

error An unexpected error occurred: "https://npm.pkg.github.com/download/@creeper12356/altcampuslifeservice/1.0.4/bd7e78c4b4a8b34f370a12eb3701748ea342efc3: Request failed \"401 Unauthorized\"".
@creeper12356
Copy link
Owner

Hello. Thanks for your issue!
I have changed the visibility of altcampuslifeservice package to public . You can try npm i again! 😺

@ch1y1z1
Copy link
Author

ch1y1z1 commented Oct 8, 2024

Thanks for your reply!

Now we have visibility to your npm package, but still dont have read permission.

npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://npm.pkg.github.com/download/@creeper12356/altcampuslifeservice/1.0.4/bd7e78c4b4a8b34f370a12eb3701748ea342efc3 - Permission permission_denied: The token provided does not match expected scopes.
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

I'm not sure but it seems that
your npm package will inherit the permissions of your repository.
That's meaning we cannot download your package because we dont have read permission of your repository.

@creeper12356
Copy link
Owner

creeper12356 commented Oct 9, 2024

@ch1y1z1
The first line of Github Docs reads:

You need an access token to publish, install, and delete private, internal, and public packages.

That means, even a public github package needs an access token to install, which is inconvenient🥲. So I've changed the registry of altcampuslifeservice to official npm registry , you can try install from here. 🐱


I'm new to npm package publishing, so if you encounter other problems when building this project, feel free to post it here. 🧡

@ch1y1z1
Copy link
Author

ch1y1z1 commented Oct 9, 2024

@creeper12356 Thanks for your reply! It solves for me! 😸️

And I could finally build and deploy on my iPhone:

IMG_7913

But before that, there are still some problems,

react-native seems to have bug during iOS build in version 0.73, which has been fixed in 0.74.
After upgrade react-native and some other dependencies to latest, I managed to build this app. But I'm not sure whether this will encounter some breaking change or other problems.

@creeper12356
Copy link
Owner

creeper12356 commented Oct 9, 2024

@ch1y1z1
Congratulations for you! 😸
I would consider upgrading react-native version to 0.74 when I'm free sometimes . You can try building and testing this app on iOS yourself first.


By the way, I would like to close this issue since it has been solved. You can create other issues if encountering other problems. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants