componentjs / component

frontend package manager and build tool for modular web applications
https://github.com/componentjs/guide
MIT License
4.55k stars 306 forks source link

How can a project depend on a github repository that doesn't have a componser.json #641

Closed g105b closed 8 years ago

g105b commented 8 years ago

I really want to use this github repository in my project, but I can't find in the component documentation how this is achieved.

Look at the output below using DEBUG environment variable. I can see that the github repository is being found, because the semver is being resolved, but why won't it find a remote?

I assume this is down to how I am using component, but it is highlighting an area of documentation that needs addressing. I will happily help out with docs after I get more understanding of the project's internals.

DEBUG=component* component install yabwe/medium-editor

  component-resolver remote not set - defaulting to remotes's defaults +0ms
  component-resolver:locals resolving local at "/home/g105b/Web/jotdown" +3ms
  component-resolver resolving "root" +2ms
  component-resolver remaining dependencies: 1 +4ms
  component-resolver remaining semver: 0 +0ms
  component-resolver finished resolving locals +1ms
  component-resolver finished resolving dependencies (1) +1ms
  component-resolver:semver resolving semver yabwe/medium-editor@* +1ms
  component-resolver:dependencies resolving dependency yabwe/medium-editor@5.8.2 +983ms
  component-resolver:dependencies searching ["local","github","bitbucket"] for yabwe/medium-editor@5.8.2 +0ms
  component-consoler Error: no remote found for dependency "yabwe/medium-editor@5.8.2". Visit http://component.github.io/troubleshooting for help.
    at Resolver.<anonymous> (/usr/local/lib/node_modules/component/node_modules/component-resolver/build/dependencies.js:504:13)
    at Generator.invoke (/usr/local/lib/node_modules/component/node_modules/component-resolver/build/index.js:141:31)
    at Generator.invoke (/usr/local/lib/node_modules/component/node_modules/component-resolver/build/index.js:79:50)
    at next (/usr/local/lib/node_modules/component/node_modules/co/index.js:74:21)
    at /usr/local/lib/node_modules/component/node_modules/co/index.js:93:18
    at Gunzip.onEnd (/usr/local/lib/node_modules/component/node_modules/component-remotes/node_modules/cogent/node_modules/raw-body/index.js:149:7)
    at Gunzip.g (events.js:180:16)
    at Gunzip.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13) +8s

       fatal : no remote found for dependency "yabwe/medium-editor@5.8.2". Visit http://component.github.io/troubleshooting for help.
timaschew commented 8 years ago

You can't use component when your dependencies don't provide a component.json file in the root directory. Here is the spec: https://github.com/componentjs/spec/blob/master/component.json/specifications.md

BUT component is not maintained anymore, you should consider to switch to another tool, there are lots of good tools, which don't rely on a custom configuration like component.json, they all (expect bower) use package.json standard:

g105b commented 8 years ago

Oh no, I was just getting to know component... shame it isn't being maintained.

Thanks.