cannot understand system.js AMD loading error

201 views
Skip to first unread message

pe...@koodaamo.fi

unread,
Feb 15, 2016, 3:25:11 PM2/15/16
to SystemJS
I am trying to load patternslib (https://github.com/Patternslib/Patterns) using systemjs. I have loaded patternslib using jspm, to "packages" directory. 

My config.js has a System.config path entry for packages loaded from github, and mapping for patternslib:

 paths: {
   
"github:*": "packages/github/*",
 
},
 map
: {
   
"patterns": "github:Patternslib/Patt...@2.0.12"
 
}




When loading system.js & the config.js via regular script tags, after a while (some timeout, I presume), I get this error:

system.js:4 Uncaught (in promise) Error: AMD module http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12/bundle.js did not define
 
Error loading http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12/bundle.js as "github:Patternslib/Patt...@2.0.12/bundle.js" from http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12.js
    at l
.<anonymous> (http://mysite/urlpath/packages/system.js:5:17431)
    at l
.instantiate (http://mysite/urlpath/packages/system.js:5:20405)
    at http
://mysite/urlpath/packages/system.js:4:6337t @ system.src.js:4892g @ system.src.js:4892(anonymous function) @ system.src.js:4892


I am at loss as to what the above means and what to do about it. Here's what I have in http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12.js (that the above error refers to):

define(["github:Patternslib/Patt...@2.0.12/bundle.js"], function(main) {
 
return main;
});

Any indicators of what could be wrong would be highly appreciated. I have spent hours already trying to figure this out...

pe...@koodaamo.fi

unread,
Feb 15, 2016, 3:47:44 PM2/15/16
to SystemJS
Oh forgot to mention that of course I am trying to import "patterns" thus:

 System.import('patterns');


maanantai 15. helmikuuta 2016 22.25.11 UTC+2 pe...@koodaamo.fi kirjoitti:
I am trying to load patternslib (https://github.com/Patternslib/Patterns) using systemjs. I have loaded patternslib using jspm, to "packages" directory. 

My config.js has a System.config path entry for packages loaded from github, and mapping for patternslib:

 paths: {
   
"github:*": "packages/github/*",
 
},
 map
: {

   
"patterns": "github:Patternslib/Patterns@2.0.12"
 
}




When loading system.js & the config.js via regular script tags, after a while (some timeout, I presume), I get this error:

system.js:4 Uncaught (in promise) Error: AMD module http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12/bundle.js did not define

 
Error loading http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12/bundle.js as "github:Patternslib/Patterns@2.0.12/bundle.js" from http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12.js

    at l
.<anonymous> (http://mysite/urlpath/packages/system.js:5:17431)
    at l
.instantiate (http://mysite/urlpath/packages/system.js:5:20405)
    at http
://mysite/urlpath/packages/system.js:4:6337t @ system.src.js:4892g @ system.src.js:4892(anonymous function) @ system.src.js:4892

Guy Bedford

unread,
Feb 16, 2016, 5:59:45 AM2/16/16
to pe...@koodaamo.fi, SystemJS
It's not a valid AMD file, setting the format in jspm and SystemJS is a standard part of the configuration workflow process, described in https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm.

This can be done with `jspm install github:Patternslib/Patterns -o "{format: 'global'}"`

On Mon, Feb 15, 2016 at 10:47 PM <pe...@koodaamo.fi> wrote:
Oh forgot to mention that of course I am trying to import "patterns" thus:

 System.import('patterns');


maanantai 15. helmikuuta 2016 22.25.11 UTC+2 pe...@koodaamo.fi kirjoitti:
I am trying to load patternslib (https://github.com/Patternslib/Patterns) using systemjs. I have loaded patternslib using jspm, to "packages" directory. 

My config.js has a System.config path entry for packages loaded from github, and mapping for patternslib:

 paths: {
   
"github:*": "packages/github/*",
 
},
 map
: {

   
"patterns": "github:Patternslib/Patt...@2.0.12"
 
}




When loading system.js & the config.js via regular script tags, after a while (some timeout, I presume), I get this error:

system.js:4 Uncaught (in promise) Error: AMD module http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12/bundle.js did not define

 
Error loading http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12/bundle.js as "github:Patternslib/Patt...@2.0.12/bundle.js" from http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12.js

    at l
.<anonymous> (http://mysite/urlpath/packages/system.js:5:17431)
    at l
.instantiate (http://mysite/urlpath/packages/system.js:5:20405)
    at http
://mysite/urlpath/packages/system.js:4:6337t @ system.src.js:4892g @ system.src.js:4892(anonymous function) @ system.src.js:4892

I am at loss as to what the above means and what to do about it. Here's what I have in http://mysite/urlpath/packages/github/Patternslib/Patt...@2.0.12.js (that the above error refers to):

define(["github:Patternslib/Patt...@2.0.12/bundle.js"], function(main) {
 
return main;
});

Any indicators of what could be wrong would be highly appreciated. I have spent hours already trying to figure this out...

--
You received this message because you are subscribed to the Google Groups "SystemJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to systemjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages