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

Error when installing package #41

Open
cviebrock opened this issue Mar 20, 2023 · 5 comments
Open

Error when installing package #41

cviebrock opened this issue Mar 20, 2023 · 5 comments

Comments

@cviebrock
Copy link

Running this command:

$ npm install -D 'https://gitpkg.now.sh/andipaetzold/zwiftmap/backend/src/shared/browser/roads?main'

Produces this output (node v18.15.0, npm 9.6.2):

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/admin/.npm/_cacache/tmp/RHEDbu/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/admin/.npm/_cacache/tmp/RHEDbu/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/admin/.npm/_logs/2023-03-20T21_43_27_681Z-debug-0.log

I've tried cleaning node_modules, package-lock.json, the npm cache, and even the entire ~/.npm directory.

@tobysmith568
Copy link

tobysmith568 commented May 25, 2023

I'm getting this error too. I'm unsure if @cviebrock and I are getting this error from the same cause but for me I believe it's because I was under the impression that gitpkg could be used to install any directory from any repository while in actual fact (and please correct me if I'm wrong @EqualMa) it can only install directories that contain package.json files. Which, if correct, means that gitpkg currently isn't fit for my use-case.

@EqualMa - would you consider adding options to the API (and website) where a package.json file can be dynamically generated from URL parameters and added to the steam and .tgz? Perhaps using a URL like
https://gitpkg.now.sh/<org>/<repo>/<dir>?<commit-ish>&packageJson.name=<whatever>&packageJson.version=<whatever>".

I believe that would be the only thing required to allow npm/yarn to install any directory from any repository via gitpkg.

If you're not a fan of this idea, perhaps the website could be updated to stress that the directory in the repository needs to already have a package.json file in it, because Using sub folders of a repo as yarn/npm dependencies made easy doesn't imply that constraint to me.

If you're a fan of this feature request but you're unable to implement it right now then I'm possibly able to give it a go.

@cviebrock - if your situation is different from mine then I'm sorry for hijacking your issue, and I'm happy to raise my request in a new issue.

@cviebrock
Copy link
Author

cviebrock commented Jun 12, 2023

... I was under the impression that gitpkg could be used to install any directory from any repository ...

This is exactly the impression I was under, @tobysmith568.

@EqualMa
Copy link
Owner

EqualMa commented Jan 23, 2024

Hi, thanks for advice. Custom package.json is planned.

@leoswing
Copy link

leoswing commented Feb 2, 2024

Error occur while try to fetch , and we retrieve 500 code when pnpm install, could anyone help to solve this problem? Much appreciate if someone helps @EqualMa

@EqualMa
Copy link
Owner

EqualMa commented Feb 2, 2024

@leoswing Hi, the error might be because GitPkg has reached bandwidth limit recently. Please consider deploying your own GitPkg service to vercel.com or sponsoring this project with the following platforms:

If there is a bug in GitPkg, please open another issue with your url.

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

4 participants