ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

build(system.js): Unable to build AoT with ModalModule on System.js

Open nouc23 opened this issue 9 years ago • 6 comments

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

nouc23 avatar Apr 18 '17 11:04 nouc23

system.js is pain to me again ;(

valorkin avatar Apr 24 '17 07:04 valorkin

I'm having the exact same issue. Someone already knows how to solve it?

mazoni avatar Jul 26 '17 02:07 mazoni

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.

nouc23 avatar Nov 07 '17 13:11 nouc23

https://github.com/valor-software/ngx-bootstrap/pull/2990

nouc23 avatar Nov 07 '17 13:11 nouc23

@valorkin

nouc23 avatar Nov 13 '17 13:11 nouc23

I was on a small vacation, sorry folks, should be merged and published this week

valorkin avatar Nov 14 '17 16:11 valorkin