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

install https://github.com/component/tip Error #109

Closed
izengliang opened this issue Aug 25, 2014 · 2 comments
Closed

install https://github.com/component/tip Error #109

izengliang opened this issue Aug 25, 2014 · 2 comments

Comments

@izengliang
Copy link

https://github.com/component/tip

i use jspm install github:component/tip

and

System.import("github:component/tip")

errors:

GET http://localhost:63342/jshow-ui/component-bind.js 404 (Not Found) [email protected]:6
GET http://localhost:63342/jshow-ui/component-emitter.js 404 (Not Found) [email protected]:6
GET http://localhost:63342/jshow-ui/component-events.js 404 (Not Found) [email protected]:6
GET http://localhost:63342/jshow-ui/component-query.js 404 (Not Found) [email protected]:6
GET http://localhost:63342/jshow-ui/domify.js 404 (Not Found) [email protected]:6
GET http://localhost:63342/jshow-ui/component-classes.js 404 (Not Found) [email protected]:6
GET http://localhost:63342/jshow-ui/component-css.js 404 (Not Found) [email protected]:6
GET http://localhost:63342/jshow-ui/jspm_packages/github/component/[email protected]/template.html.js 404 (Not Found) [email protected]:6
GET http://localhost:63342/jshow-ui/document-offset.js 404 (Not Found) [email protected]:6

@subesokun
Copy link

When trying to import "github:component/tip" the es6 module loader loads the index.js file of that repository which defines the following requires

var bind = require('bind');
var Emitter = require('emitter');
var events = require('events');
var query = require('query');
var domify = require('domify');
var classes = require('classes');
var css = require('css');
var offset = require('offset');

but there it uses kind of short-cuts for the modules names like require('bind') instead of require('npm:component-bind'). Try setting manually the dependencies for testing purpose via jspm install npm:component-tip -o "{ dependencyMap: { 'bind': 'npm:component-bind@*', ..etc... }, format: 'cjs' }"
As the dependencies e.g. component-events defines again sub dependencies this might take a while to catch all of them. Please have a look on the package.json for all required npm dependencies.

If you've found a working configuration then you can publish it to the jspm registry as explained here #101 (comment) by Guy :)

I didn't test it but I hope that it works like that.

Edit: Sorry, maybe a simple jspm install npm:component-tip helps already if jspm respects the browser property in the package,json.

@guybedford
Copy link
Member

Sorry I don't know how I missed this... the way to make this work would be to do:

  jspm install npm:component-tip

When installing from github, it is not assumed that the dependencies are npm dependencies, and that is where this is breaking down.

@subesokun if you wanted to override the dependency map, the better way to do this would be through configuration -

System.config({
  map: {
    'github:component/[email protected]': {
      map: {
        bind: 'npm:[email protected]', // etc.
      }
    }
  }
});

It's a more flexible way of remapping as it doesn't get built into the underlying files and can be maintained under version control.

guybedford pushed a commit that referenced this issue Apr 8, 2023
* Added typescript dev dependency (#109)

* Updated jspm link to recognize jsx file extension (#109)

* Updated code analyzer to process jsx using the typescript compiler (#109)
guybedford pushed a commit that referenced this issue Apr 8, 2023
* Added typescript dev dependency (#109)

* Updated jspm link to recognize jsx file extension (#109)

* Updated code analyzer to process jsx using the typescript compiler (#109)
guybedford pushed a commit that referenced this issue Apr 8, 2023
* Added typescript dev dependency (#109)

* Updated jspm link to recognize jsx file extension (#109)

* Updated code analyzer to process jsx using the typescript compiler (#109)
guybedford pushed a commit that referenced this issue Apr 8, 2023
* Added typescript dev dependency (#109)

* Updated jspm link to recognize jsx file extension (#109)

* Updated code analyzer to process jsx using the typescript compiler (#109)
guybedford pushed a commit that referenced this issue Apr 8, 2023
* Added typescript dev dependency (#109)

* Updated jspm link to recognize jsx file extension (#109)

* Updated code analyzer to process jsx using the typescript compiler (#109)
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