build(system.js): Unable to build AoT with ModalModule on System.js
Application base: https://github.com/mgechev/angular-seed I also repeat this problem on raw seed.
System js configuration:
{
name: 'moment',
path: 'node_modules/moment',
packageMeta: {
main: 'moment.js',
defaultExtension: 'js'
}
},
{
name: 'ngx-bootstrap',
packageMeta: {
main: 'bundles/ngx-bootstrap.umd.min.js',
defaultExtension: 'js'
}
}
which is equal to: https://github.com/valor-software/angular2-quickstart/blob/master/systemjs.config.js
except format: 'cjs'
On building I have an error:
Error on fetch for ngx-bootstrap/positioning.js at file:///...../node_modules/ngx-bootstrap/positioning.js
Loading ngx-bootstrap/modal/modal.module.js
Loading dist/tmp/app/app.module.ngfactory.js
Loading dist/tmp/app/main-prod.js
ENOENT: no such file or directory, open '/...../node_modules/ngx-bootstrap/positioning.js'
After manually add positioning module to system.js configuration I get this same error but with component-loader. Then i add component-loader configuration to system.js, and again I get similar error to previous one, (see the difference on path between errors)
Error on fetch for ngx-bootstrap/positioning at file:///....../node_modules/ngx-bootstrap/positioning
Loading ngx-bootstrap/modal/modal.module.js
Loading dist/tmp/app/app.module.ngfactory.js
Loading dist/tmp/app/main-prod.js
EISDIR: illegal operation on a directory, read
system.js is pain to me again ;(
I'm having the exact same issue. Someone already knows how to solve it?
Lately this problem came back to me. So I create simple fix, change imports of barrel file, by adding barrel file name
} from './positioning/index';
Probably there might be a better solution for this, but it working ok.
https://github.com/valor-software/ngx-bootstrap/pull/2990
@valorkin
I was on a small vacation, sorry folks, should be merged and published this week