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

Issue with yarn #20

Closed
marcoscaceres opened this issue Nov 15, 2016 · 5 comments
Closed

Issue with yarn #20

marcoscaceres opened this issue Nov 15, 2016 · 5 comments

Comments

@marcoscaceres
Copy link

marcoscaceres commented Nov 15, 2016

Not sure if this is directly related to domReady... but, given a package.json configuration:

{
  "devDependencies": {
    "domReady": "github:requirejs/domReady"
  }
}

Yarn install fails, because (I'm guessing here) it can't find the right package on NPM:

error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/Users/username/Library/Caches/Yarn/npm-domReady-2.0.1-3ab6964ba262be995e56452d91b6342f025d30ef'".

I'm wondering, could this library be published properly to NPM? I know npm and yarn can resolve github URLs, but it's nicer having things in NPM when looking things up.

@marcoscaceres
Copy link
Author

(I raise this as it's causing our CI to fail: https://travis-ci.org/w3c/respec)

@jrburke
Copy link
Member

jrburke commented Nov 15, 2016

This seems to be a growing pain with yarn. There are a few issues filed with yarn around fetching dependencies in git repos, this one seems to indicate that this form of the dependency name should work, and should also work with npm:

"domReady": "git+ssh://git@github.com/requirejs/domReady.git"

No plans to publish to npm for this repo.

@jrburke jrburke closed this as completed Nov 15, 2016
@marcoscaceres
Copy link
Author

No plans to publish to npm for this repo.

I totally respect that, but just wondering what your rationale is for not publishing to npm?

@jrburke
Copy link
Member

jrburke commented Nov 16, 2016

It is an extra step beyond what I need to normally here, which is just tag the release. I do not expect a high amount of change for this repo, and I think its technology is falling out of favor.

The installed name will not end up as just "domReady", as it needs to be namespaced in some way to fit into npm's global namespace. The github URL allows the "global namespace" to be unique, but to just use "domReady" as the local module ID dependency.

So, mostly just feels like more of a hassle for the expected payoff for this repo, and some lingering annoyance at npm's global namespace affecting the local dependency name. I do appreciate that most other folks would not see these as big enough concerns to prevent npm publishing.

@marcoscaceres
Copy link
Author

@jrburke, really appreciate you taking the time to write up the justification. Makes sense!

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