Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source map paths are incorrect in published packages #212

Closed
PatrickJS opened this issue Mar 20, 2016 · 3 comments
Closed

Source map paths are incorrect in published packages #212

PatrickJS opened this issue Mar 20, 2016 · 3 comments
Labels
P2 The issue is important to a large percentage of users, with a workaround
Milestone

Comments

@PatrickJS
Copy link
Member

during build you need to set sourceRoot to the correct path

WARNING in ./~/@angular2-material/toolbar/toolbar.js
Cannot find SourceMap '../../../../components/toolbar/toolbar.js.map': Error: Cannot resolve 'file' or 'directory' ../../../../components/toolbar/toolbar.js.map in /Users/patrick/Documents/AngularClass/angular2-webpack-starter/node_modules/@angular2-material/toolbar

WARNING in ./~/@angular2-material/sidenav/sidenav.js
Cannot find SourceMap '../../../../components/sidenav/sidenav.js.map': Error: Cannot resolve 'file' or 'directory' ../../../../components/sidenav/sidenav.js.map in /Users/patrick/Documents/AngularClass/angular2-webpack-starter/node_modules/@angular2-material/sidenav

WARNING in ./~/@angular2-material/button/button.js
Cannot find SourceMap '../../../../components/button/button.js.map': Error: Cannot resolve 'file' or 'directory' ../../../../components/button/button.js.map in /Users/patrick/Documents/AngularClass/angular2-webpack-starter/node_modules/@angular2-material/button

WARNING in ./~/@angular2-material/progress-circle/progress-circle.js
Cannot find SourceMap '../../../../components/progress-circle/progress-circle.js.map': Error: Cannot resolve 'file' or 'directory' ../../../../components/progress-circle/progress-circle.js.map in /Users/patrick/Documents/AngularClass/angular2-webpack-starter/node_modules/@angular2-material/progress-circle

WARNING in ./~/@angular2-material/checkbox/checkbox.js
Cannot find SourceMap '../../../../components/checkbox/checkbox.js.map': Error: Cannot resolve 'file' or 'directory' ../../../../components/checkbox/checkbox.js.map in /Users/patrick/Documents/AngularClass/angular2-webpack-starter/node_modules/@angular2-material/checkbox

WARNING in ./~/@angular2-material/radio/radio.js
Cannot find SourceMap '../../../../components/radio/radio.js.map': Error: Cannot resolve 'file' or 'directory' ../../../../components/radio/radio.js.map in /Users/patrick/Documents/AngularClass/angular2-webpack-starter/node_modules/@angular2-material/radio

WARNING in ./~/@angular2-material/card/card.js
Cannot find SourceMap '../../../../components/card/card.js.map': Error: Cannot resolve 'file' or 'directory' ../../../../components/card/card.js.map in /Users/patrick/Documents/AngularClass/angular2-webpack-starter/node_modules/@angular2-material/card

//# sourceMappingURL=../../../../components/button/button.js.map
hsould be
//# sourceMappingURL=button.js.map

@devversion
Copy link
Member

Maybe related to #203?

@jelbourn jelbourn added the P2 The issue is important to a large percentage of users, with a workaround label Mar 20, 2016
@jelbourn jelbourn added this to the alpha.2 milestone Mar 20, 2016
@jelbourn jelbourn changed the title source map problems Source map paths are incorrect in published packages Mar 20, 2016
@jgutix
Copy link

jgutix commented Apr 3, 2016

As of now it's apparently not possible to run any of the components through npm dependency because they are still referencing the 'components' folder, wich if installed through npm doesn't exist.
See: https://github.com/angular/material2/blob/master/src/components/button/button.ts#L28
templateUrl: './components/button/button.html',

This line is kept when published to npm therefore, the component is throwing:
angular2.dev.js:23730 EXCEPTION: Error: Uncaught (in promise): Failed to load components/button/button.html

The only workaround I have found is to build the project (this) and copy the folder /dist/components to my project, which I guess it's not the intended usage, right?

This was referenced Apr 6, 2016
andrewseguin pushed a commit to andrewseguin/components that referenced this issue Oct 15, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

No branches or pull requests

4 participants