mrm
mrm copied to clipboard
Loading mrm presets from custom registries?
Hello! :wave:
Thanks for your work on mrm. I'm currently facing an issue where the module resolution does not seem to work for private packages installed via the GitHub Packages Registry; after installing the preset globally it then asks again:
❯ npx mrm mytask --preset @org/mrm-preset-repo
Need to install the following packages:
mrm
Ok to proceed? (y) y
? A task or preset you’re trying to run isn’t installed. Would you like to globally install it from npm? @org/mrm-preset-repo
Installing @org/mrm-preset-repo...
changed 71 packages, and audited 72 packages in 2s
7 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
? A task or preset you’re trying to run isn’t installed. Would you like to globally install it from npm? (Use arrow keys)
❯ @org/mrm-preset-repo
Don’t install any packages
I've tried with npx mrm@2 mytask --preset @org/mrm-preset-repo
as well and am facing the same problem.
Any advice would be appreciated!
Thanks 🙂
@ben-eb not sure if my comment is of any use, haven't tried this myself but do you have an .npmrc
file locally, in your project, or in your home directory, which authenticates to the GitHub Package Registry? I believe you need that in order to install stuff from the registry.
@oprearocks Yes, the authentication isn't the issue as the package is installed globally from GitHub Packages. If it were I might expect to see a 401
or 404
code from the first prompt... 🤔
I had another go at this today due to the recent release of mrm 4. I can still reproduce this but I am clearer about what is going on here; as I can get my preset to work if I install mrm
into my project as a development dependency.
Possibly something to do with the module resolution using npx
and not the fact I was using a custom registry? In any case I thought I would update. 🙂
Hello @ben-eb, have you been able to install a private package with npx? I'm facing the same problem :(
@underwoodarturo See my comment above, this seems to work if I install mrm
into the project rather than using it via npx
. Of course it's not ideal but I guess you can always install mrm, do your mrm tasks and then optionally uninstall it afterwards 🙂