-
Notifications
You must be signed in to change notification settings - Fork 23
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
Any way to silence ng-metadata "Cannot find source file" warnings? #307
Comments
Can you share a bit about your tsconfig.json config and how you are importing ng-metadata? |
Well, I haven't made any changes to the Angular1-scaffold project, so the tsconfig.json isn't any different than what's found at: https://github.com/ngParty/Angular1-scaffold/blob/master/tsconfig.json. The steps to reproduce for me are very straight forward:
...everything builds fine, but I get 64 warnings. My environment is as follows:
|
Same here:
OS: Windows 7 |
Same here, warnings shows only on Windows (7 also in my case), Ubuntu works pretty much well. |
Same here. ./~/ng-metadata is showing warnings! |
I think I've been able to get to the bottom of this. After reading the following post, I discovered my problem to be in the source-map-loader: For some reason, the "exclude" section was being respected on Linux, but not Windows. So after some experimentation, I discovered that I had to add another item to the "exclude" section for Windows' sake. So here's how my module.rules[] section looked in webpack.conf.js before making the change:
Here's what solved my problem on a Windows 7 machine:
Not sure if this will fix it for everyone, but I just thought I'd pass along what worked for me. |
Worked here for warnings with ng2-toastr when building angular-cli & webpack. Thanks pal, been wasting hours trying to resolve..... |
Great, I think this can be closed then |
Everything is working great, but I keep getting warnings like the following when I run a build:
WARNING in ./~/ng-metadata/platform-browser-dynamic.js
Cannot find source file 'platform-browser-dynamic.ts': Error: Cannot resolve 'file' or 'directory' ./platform-browser-dynamic.ts in .\Angular1-scaffold\node_modules\ng-metadata
(... plus many more)
Is there anything I can do to silence only these messages?
I'm running this build on Windows 7.
Thanks!
The text was updated successfully, but these errors were encountered: