Comments (19)
@zkochan : Interestingly it worked after I removed .git
from the link. It's not happening any more (even with .git
). I ll update if I am able to reproduce it.
Thanks.
from pnpm.
@dbkaplun are the packages you need not on GitHub? For GitHub-hosted packages pnpm install
was implemented.
It is a pretty tough task to make it work in all the possible scenarios. npm's code for installing packages from git has almost 500 lines https://github.com/npm/npm/blob/9e03561547ec5830c5f61caa4e6221d4d3b813aa/lib/cache/add-remote-git.js
from pnpm.
Also, github modules should not be stored in the modulename@version
format. they should have their own id's based on the unambiguous reference, eg:
node_modules/.store/git!!!github.com!rstacruz!scour.git#dff12e44b155613e000f1200f5069bfead7d459d
also keep note that some modules have a different github name than the module name. (eg, pnpm.js
is in rstacruz/pnpm
instead of rstacruz/pnpm.js
), so that'd have to be accounted for, too:
node_modules/pnpm.js ->
node_modules/.store/git!!!github.com!rstacruz!pnpm.git#fc20f75c9e6e7e551dd00018f27eea1b17b3c3bf
from pnpm.
I might take a shot at this. Was taking a look at how npm does git repos earlier. Things seem to be progressing super quickly though so half expect to see a PR from someone by the time I get started 😃
from pnpm.
It's complicated but try!
On Monday, February 1, 2016, Hal Henke [email protected] wrote:
I might take a shot at this. Was taking a look at how npm does git repos
earlier. Things seem to be progressing super quickly though so half expect
to see a PR from someone by the time I get started [image: 😃]—
Reply to this email directly or view it on GitHub
#20 (comment).
from pnpm.
Heh :-)
OK - I'm committed now. Will work on it over next couple of days.
from pnpm.
btw, have a look at lib/resolve/tarball.js
to see how its handled for http://site.com/foo.tgz
tarballs. it saves to the format of:
node_modules/.store/in-array-1.0.1#fc20f75c9e6e7e551dd00018f27
where the hex number is a hash of the URL it was fetched from. I'm guessing git urls should be handled similarly, ie:
node_modules/.store/halhenke-jade-react-loader#fc20f75c9e6e7e551dd00018f27
where the hex number is a hash of the git URL.
from pnpm.
OK. I was thinking of doing a bare/mirror clone - just getting the git repository first - and then doing one or more clones from that local version of the repository to get the actual code - mostly in case there were dependencies on different tags/commits from the same repository. However since there are no longer plans to link everything from a global node_modules folder this seems a lot less likely.
from pnpm.
Just wanted to add the lesser known syntax(es) also supported by npm:
npm install github:user/repo
npm install github:user/repo#30a8274b
from pnpm.
and bitbucket:a/b
! btw, npm-package-arg will take care of these for you
from pnpm.
I suggest we resolve the commit hash via Github API and download tarball. This would be better, involving with git is complicated.
from pnpm.
Is it possible? Last I checked you can't download a tar ball of a commit Id
On Tuesday, February 23, 2016, Khoa Nguyen [email protected] wrote:
I suggest we resolve the commit hash via Github API and download tarball.
This would be better, involving with git is complicated.—
Reply to this email directly or view it on GitHub
#20 (comment).
from pnpm.
Your master branch
https://github.com/rstacruz/pnpm/archive/21e71acf598bdf78eaf9d5915e0f5d2fceb8acb8.tar.gz
We can replace commit hash with brach name
from pnpm.
Hey, sorry for the lateness in getting back to you on this - had to take a bit of a break on other stuff.
I was reluctant to do anything that relied on GitHub's API because that wouldnt cover other valid npm cases that involve non-Github git repos. Tarballs would be nice because they fit into the existing design which, from memory. is based around streaming files whereas, from what I've seen, git clone involves a fair bit of handshake logic etc that would suck to reproduce (and I haven't seen in any library).
So where this is at, at the moment was using the shell version of git and trying to extract progress information (doable but a bit ugly) and hopefully slot it into the rest of the workflow as seamlessly as I could. Not sure if that sounds sensible or not.
At any rate will try to finish this week though am happy to hand over to anyone who might have a better handle on the issues.
from pnpm.
Just ran into this issue. It seems I can't use pnpm to install these dependencies so I think this is a blocker. Should pass through to npm, at least until native git support is added.
from pnpm.
@dbkaplun you can try to install the latest pnpm. Native GIT support was added in v0.35.0
(NOTE: currently your package has to be in the root of the GIT repo that you require)
from pnpm.
@zkochan If we point to some to some github commit hash, pnpm doesn't work properly.
Example:
{
"somepackage": "git://github.com/geekguy/somepackage.git#133a02",
}
When we do pnpm install, it throws following error.
! failed to clone repository from git+ssh://git://github.com/geekguy/somepackage.git
Cloning into '/tmp/deploy/test/node_modules/.store/git+ssh:..
warning: Could not find remote branch 133a02 to clone.
fatal: Remote branch 133a02 not found in upstream origin
Is there any workaround for this?
from pnpm.
@geekguy are you sure the commit hash that you used exists?
I've tried with "applyq": "git://github.com/zkochan/applyq#ff931e"
and it worked fine
from pnpm.
"termynal": "git://github.com/ines/termynal#9b30189",
isn't working
from pnpm.
Related Issues (20)
- pnpm v9 multiple react instances
- error (ETIMEDOUT). Will retry in 10 seconds. 2 retries left. HOT 1
- Unsupported warning engine with filters
- Improve Dependency Management in React Native Monorepo
- pnpm+nexus install failed ,but npm is success HOT 1
- The terminal crashes when using Ctrl+C to exit the process. HOT 2
- allow `"patchedDependencies"` patch files to come from dependencies HOT 6
- Pnpm does not bundle subdependencies HOT 1
- Couldn't read package.json of local dependency HOT 2
- `pnpm up -i --latest` Updates unspecified packages HOT 5
- ERR_PNPM_FETCH_404 for workspace packages HOT 2
- `pnpm update --prod` installs dev dependencies
- [email protected] seems to incorrectly resolve peer dependencies HOT 3
- Updating to pnpm 9.x (from 8.12.1) and run `pnpm i` throws exception: `Cannot read properties of undefined (reading 'missingPeersOfChildren')` HOT 1
- After updating to v9, pnpm checks only npm registry HOT 2
- Exits with status code 0 even if script is not found
- Officially support `omit` config setting from `npm` HOT 2
- Threads are not joined when `pnpm -r script` is interrupted with `SIGINT`
- Fix (or document changes in) "file:" protocol HOT 5
- pnpm completion broken with corepack HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pnpm.