Systemjs: Canonicalization error during jspm bundle

Created on 25 Jan 2016  路  3Comments  路  Source: systemjs/systemjs

Hello,

We are using this mapping and use it like this. It works fine in the browser, but it gives us the following error during jspm bundle:

D:\Development\kendo-systemjs-bug>jspm bundle test
     Building the bundle tree for test...

err  Error tracing test at file:///D:/Development/kendo-systemjs-bug/src/test.js
        Error: Unable to calculate canonical name to bundle file:///foo/bar.js. Ensure that this module sits within the baseURL or a wildcard path config.
         at getCanonicalNamePlain (D:\Development\kendo-systemjs-bug\node_modules\systemjs-builder\lib\utils.js:203:13)
         at getCanonicalName (D:\Development\kendo-systemjs-bug\node_modules\systemjs-builder\lib\utils.js:130:19)
         at D:\Development\kendo-systemjs-bug\node_modules\systemjs-builder\lib\trace.js:423:36

Test repository: https://github.com/JeroenVinke/kendo-systemjs-bug

  1. npm install
  2. jspm install
  3. jspm bundle test

If we instead use the "foo/*": "foo/*" mapping in the paths section, bundling works. We got the recommendation to use map instead of paths (here) so we are trying to follow it :).

Thanks

Most helpful comment

@guybedford I'm getting similar errors with bundling

Unable to calculate canonical name to bundle file:////src/comp-one.js. Ensure that this module sits within the baseURL or a wildcard path config.

How can I apply wildcard path config as some of those component files do not live under the baseURL?

All 3 comments

@JeroenVinke can you not just leave out that map entirely or use foo: 'foo' as the map? /foo means an absolute path in the file system hence the issue.

/foo means an absolute path in the file system hence the issue.

that makes sense, we'll figure something out. thanks :+1:

@guybedford I'm getting similar errors with bundling

Unable to calculate canonical name to bundle file:////src/comp-one.js. Ensure that this module sits within the baseURL or a wildcard path config.

How can I apply wildcard path config as some of those component files do not live under the baseURL?

Was this page helpful?
0 / 5 - 0 ratings