Ngx-bootstrap: WARNING when webpack loading all *.js.map

Created on 12 Jul 2016  路  9Comments  路  Source: valor-software/ngx-bootstrap

Hi,

After upgrading ng2-bootstrap from 1.0.17 to 1.0.20, a lot of warning appear during the TypeScript compilation :

[...]
WARNING in ./~/ng2-bootstrap/components/rating.js
Cannot find SourceMap 'rating.js.map': Error: Cannot resolve 'file' or 'directory' ./rating.js.map in /var/www/frontend-admin/node_modules/ng2-bootstrap/components

WARNING in ./~/ng2-bootstrap/components/tabs.js
Cannot find SourceMap 'tabs.js.map': Error: Cannot resolve 'file' or 'directory' ./tabs.js.map in /var/www/frontend-admin/node_modules/ng2-bootstrap/components

WARNING in ./~/ng2-bootstrap/components/timepicker.js
Cannot find SourceMap 'timepicker.js.map': Error: Cannot resolve 'file' or 'directory' ./timepicker.js.map in /var/www/frontend-admin/node_modules/ng2-bootstrap/components
[...]

Full version here : warning-bg2-bootstrap.txt

I'm using webpack (from https://github.com/AngularClass/angular2-webpack-starter).

It seems to work but this is very annoying.

Most helpful comment

source maps removed because they produce warning hell

WARNING in ./~/ng2-bootstrap/ng2-bootstrap.js
Cannot find source file 'ng2-bootstrap.ts': Error: Cannot resolve 'file' or 'directory' ./ng2-bootstrap.ts in /home/valorkin/work/open-source/angular2-webpack-starter/node_modules/ng2-bootstrap

All 9 comments

@antitoine We don't add sourceMaps and webpack seems to require them with your configuration.

Having the same problem.

I don't use bundles, my app is building from required components and ng2-bootstrap components has refs for map files.
'Alert' component for example:

...
exports.AlertComponent = AlertComponent;
//# sourceMappingURL=alert.component.js.map

@nick1247 Thanks for this information. Unluckily the sourcemaps get excluded by the .npmignore.

@valorkin Either we set "sourceMap": true in the tsconfig.json or we remove the exclusion in the .npmignore

Thanks

Same problem with SystemJS

there are 2 possible options,

  • disable source maps for common.js build
  • remove source map ignore from npmignore

@antitoine please join https://www.hamsterpad.com/chat/ng2
and drop me a message
so we can try both options fast

source maps removed because they produce warning hell

WARNING in ./~/ng2-bootstrap/ng2-bootstrap.js
Cannot find source file 'ng2-bootstrap.ts': Error: Cannot resolve 'file' or 'directory' ./ng2-bootstrap.ts in /home/valorkin/work/open-source/angular2-webpack-starter/node_modules/ng2-bootstrap

Fixed with the 1.0.22 npm package ! Thank

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tpiros picture tpiros  路  3Comments

phmello picture phmello  路  3Comments

PascalHonegger picture PascalHonegger  路  3Comments

webdev48 picture webdev48  路  3Comments

juanitavollmering picture juanitavollmering  路  3Comments