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

Support for tarball URLs? #7

Open
acdlite opened this issue Mar 17, 2019 · 5 comments
Open

Support for tarball URLs? #7

acdlite opened this issue Mar 17, 2019 · 5 comments

Comments

@acdlite
Copy link

acdlite commented Mar 17, 2019

I have a URL to an npm tarball. I can install it with yarn:

yarn add https://react-canaries-3adg6ifso.now.sh/13886/react

And it also works if I add it to a local package.json file:

"react": "https://react-canaries-3adg6ifso.now.sh/13886/react"

But it doesn't work in CodeSandbox: https://codesandbox.io/s/pmy0470zj7
Screen Shot 2019-03-17 at 12 09 17 AM

@acdlite
Copy link
Author

acdlite commented Mar 17, 2019

It must have downloaded the tarball correctly, because [email protected] is the version field of the tarball's package.json file.

I have a feeling the packager is attempting to install [email protected] from the npm registry, and failing because it doesn't exist.

@acdlite
Copy link
Author

acdlite commented Mar 17, 2019

Some additional context about what I'm trying to do: these URLs point to private modules that have not been published to npm. The tarballs are stored on our CI server. I want to be able to paste one of these URLs into CodeSandbox so I can test a React PR/commit without having to publish a release.

@CompuIves
Copy link
Member

Intereeesting, it could be that we have to update our yarn to support it.

@acdlite
Copy link
Author

acdlite commented Mar 19, 2019

I think this part might be relevant?

const depPath = `v${VERSION}/packages/${depName}/${
dependencies[depName]
}.json`;
const s3Object = await getFileFromS3(depPath);

This assumes the version is semver string, but in this case it results in effectively this:

const s3Object = await getFileFromS3('vhttps://react-canaries-3adg6ifso.now.sh/13886/react/react.json'); 

which I'm guessing could cause the S3 request to fail

@acdlite
Copy link
Author

acdlite commented Mar 19, 2019

By the way, I imagine this isn't a super high priority issue. I can try to submit a PR this weekend, if I can figure out how to get a dev environment set up. Any guidance would be greatly appreciated!

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