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

[Feature request] install packages from other registries, or https CDN sources #570

Open
ortonomy opened this issue Jul 25, 2023 · 5 comments

Comments

@ortonomy
Copy link

ortonomy commented Jul 25, 2023

Motivation

Love RunJS and the node package support. It's really useful and saves me a lot of time to have to create my own little node project with TS support every time I just want a REPL to test code...

But....

Recently SheetJS / xlsx took a really weird decision to publish an update ONLY on their CDN as a tarball https://docs.sheetjs.com/docs/getting-started/installation/nodejs

image

So now, I can't install the latest version in RunJS

Idea

  • allow installing libs from github registries (by logging into to different registries other than NPM)
  • allow install packages from HTTPS sources

Thanks for listening!

@ortonomy ortonomy changed the title [FeatureRequest] install packages from other registries, or https source like jsdelivr [Feature Request] install packages from other registries, or https source like jsdelivr Jul 25, 2023
@ortonomy ortonomy changed the title [Feature Request] install packages from other registries, or https source like jsdelivr [Feature request] install packages from other registries, or https source like jsdelivr Jul 25, 2023
@ortonomy ortonomy changed the title [Feature request] install packages from other registries, or https source like jsdelivr [Feature request] install packages from other registries, or https CDN sources Jul 25, 2023
@lukehaas
Copy link
Owner

Thanks, @ortonomy. I've previously looked into this. However, I encountered issues during the build step of a lot of common packages. Some can be installed without issues this way, usually, the ones that include dist files. But the lack of reliability around building packages made me not ship this as a feature.
I might take a second look someday as it's certainly something that would be good to support.

@ortonomy
Copy link
Author

ortonomy commented Jul 25, 2023

Thanks for responding so fast @lukehaas .

How do you manage the package under the hood? In a package JSON? Could it be something you put behind an "Experimental" feature wall or "HERE BE DRAGONS - UNSUPPORTED FEATURE" kind of thing? Seems yarn, npm, and pnpm are all capable of handling this (at least from sheetJS's instructions)

Come on, gimme access 😄 Let me fiddle with that package.json file

@lukehaas
Copy link
Owner

It uses NPM to install and manage the packages. You could cd'ing into the RunJS app support directory, which is where the package.json is and try manually installing packages from github there.

@ortonomy
Copy link
Author

Thank you! I'll let you know how it goes :D

@oculus42
Copy link

Manual install from ~/Library/Application Support/runjs works for me.

Notes on my experience:
Creating the npm config .npmrc file in that folder can cause some problems for the RunJS package lookup GUI. I set up an npm proxy (non-ssl) and was unable to lookup/install packages with a global, insecure registry set. I did not experience lookup issues for the nom global registry when using a scoped registry entry, but I was unable to lookup packages from that scope/registry.

None of that is surprising, but if someone places a .npmrc file in the folder they should expect it to cause headaches.

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

3 participants