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

BUG: don't bomb out if we find a package that isn't in npm #118

Open
tonywoode opened this issue Aug 12, 2020 · 2 comments
Open

BUG: don't bomb out if we find a package that isn't in npm #118

tonywoode opened this issue Aug 12, 2020 · 2 comments
Labels

Comments

@tonywoode
Copy link

tonywoode commented Aug 12, 2020

Describe the bug
I have my own unpublished npm module on my filesystem that I have npm install -g. Making a gist after this has been installed and then trying to do an initial sync fails, and no npm packages at all are installed from the gist:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/replace-slack-text - Not found
npm ERR! 404
npm ERR! 404  '[email protected]' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
...

$ npm list -g --depth=0
/Users/twoode/.nvm/versions/node/v12.18.3/lib
├── [email protected]
└── [email protected]

A couple of other reasons users may have packages not in npm: they might have npm linked them, they might use a private repo in addition to npm...

To Reproduce
Steps to reproduce the behavior:

  1. make a global package that isn't on npm (eg: npm install -g some trivial thing with a package.json)
  2. follow your quickstart instructions to step 3
  3. get the above error, note that no packages from the gist have been installed at this point

Expected behavior
If we can't locate a package on npm, we should continue to print the error, but also try to install all other packages

@tonywoode tonywoode added the bug label Aug 12, 2020
@riyadhalnur
Copy link
Owner

@tonywoode thank you for filing this! would make for a good feature. I do have plans to add a diff and dry-run flag (#97) for safer syncing. Any PR is always welcome. I don't get much time these days and I'm not sure if the usage stats for this helper warrant any more attention from me for the time being.

@tonywoode
Copy link
Author

https://stackoverflow.com/questions/41583514/npm-how-to-sync-global-packages-between-different-computers

it seems to me as if you're the only person in the world making a tool that can replicate an install of the heavily-relied-upon modules from the world's largest code repository. I'm amazed at the lack of usage. People are messy and tend to repeat tasks ;-)

I'm not in any position to do a PR right now i'm afraid, would love to otherwise....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants