These are chat archives for systemjs/systemjs

15th
Jul 2015
Guy Bedford
@guybedford
Jul 15 2015 15:49
@Munter not currently, there is an issue for this support at systemjs/systemjs#549
@zcregan a separate custom loader to SystemJS could implement the Node lookup semantics
carlosagsmendes
@carlosagsmendes
Jul 15 2015 17:09
I'm trying to load my config file using the builder
var jspm = require('jspm'); var builder = new jspm.Builder(); builder.loadConfigSync('./config.js');
but I get the following error: D:\Repos\this λ node load-config.js D:\Repos\this\node_modules\jspm\node_modules\systemjs\dist\system.src.js:1388 throw new TypeError('baseURL should only be configured once and must be ^ TypeError: baseURL should only be configured once and must be configured first. at SystemJSNodeLoader.SystemJSLoader.config (D:\Repos\this\node_modules\jspm\node_modules\systemjs\dist\system.src.js:1388:13) at Builder.config (D:\Repos\this\node_modules\jspm\node_modules\systemjs-builder\lib\builder.js:213:10) at Object.global.System.config (D:\Repos\this\node_modules\jspm\node_modules\systemjs-builder\lib\builder.js:186:12) at eval (eval at executeConfigFile (D:\Repos\this\node_modules\jspm\node_modules\systemjs-builder\lib\builder.js:190:23), <anonymous>:2:8) at Builder.executeConfigFile (D:\Repos\this\node_modules\jspm\node_modules\systemjs-builder\lib\builder.js:190:35) at Builder.loadConfigSync (D:\Repos\this\node_modules\jspm\node_modules\systemjs-builder\lib\builder.js:201:21) at Object.<anonymous> (D:\Repos\this\load-config.js:3:9) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32)
I'm not defining the baseURL beforehand and it's the first line of my config.js file. Any ideas why this is failing?
If I do it passing the path to the config in the constructor it works fine
var jspm = require('jspm'); var builder = new jspm.Builder('./config.js');
carlosagsmendes
@carlosagsmendes
Jul 15 2015 17:14
But I might be missing something since the bundles: {},property is empty
and in my config.jsI have the following bundles
"bundles": { "bundles/knockout-bundle": [ "github:knockout/knockout@3.3.0/dist/knockout.debug.js", "github:knockout/knockout@3.3.0.js", "github:rniemeyer/knockout-delegatedEvents@0.6.0/build/knockout-delegatedEvents.min.js", "github:rniemeyer/knockout-delegatedEvents@0.6.0.js" ], "bundles/main": [ "github:knockout/knockout@3.3.0/dist/knockout.debug.js", "github:knockout/knockout@3.3.0.js", "lib/main.js" ] }
carlosagsmendes
@carlosagsmendes
Jul 15 2015 17:30
Also tried to get the bundles using systemjs-builder directly but it is empty too:
var Builder = require('systemjs-builder');
var builder = new Builder('', './config.js');
console.log(builder.loader.bundles);
carlosagsmendes
@carlosagsmendes
Jul 15 2015 18:51
Does someone know how can I read the config? And write my bundles to the config?
Davis Kim
@davis
Jul 15 2015 19:01
are we supposed to commit our config.js?
Peter Müller
@Munter
Jul 15 2015 19:02
I would recommend committing it. It may contain local overrides
Davis Kim
@davis
Jul 15 2015 19:02
got it
because sometimes cloning a repo,
doing a jspm install changes the config.js
Peter Müller
@Munter
Jul 15 2015 19:04
Maybe your semver matches are a bit to loose
Davis Kim
@davis
Jul 15 2015 19:08
ah.. got it
Peter Müller
@Munter
Jul 15 2015 19:47
I have a locally check in and modified underscore (don't ask). Some of my jspm installed npm packages depend on underscore. How do I configure SystemJS to use my local copy instead of the external ones?
Peter Müller
@Munter
Jul 15 2015 19:54
replacing "underscore": "npm:underscore@1.8.3" with "underscore": "underscore" in config.js works for loading via systemjs. But jspm throws an error when running jspm install