-
Notifications
You must be signed in to change notification settings - Fork 12k
ng eject creates a source-map error when @angular/material is used #4905
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
Comments
Same problem occured to me yesterday - haven't found any solution yet. Possibly related: mozilla/source-map#247 |
As a quick workaround setting However a proper solution is needed. |
@Aides359 : i can't find webpack.config.js in root folder of project |
@kamalkech 'ng eject' should have generated webpack.config.js at your root. I am having this exact issue as well.. Trying to override the default url-loader for .cur and .ani files and I thought I found the solution with ng eject but alas.... hopefully this issue is the last hurdle.. |
Don't write two or more classes in the same ts file. I think it's a bug of 'source-map'. |
I am 100% sure that I have no file with more than one class in it. |
Maybe you can try this solution. |
That's it! PS: @jackytse your link is not referencing the correct target |
We have exactly the same problem but only with Windows 7. Under macOS 10.12 it's working fine. Is there a satisfying solutions yet? |
CLI 1.0 prerelease versions are no longer supported. If this error still occurs on the latest version (6.1.4 currently). Please open a new issue describing the problem. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Versions.
Repro steps.
The log given by the failure.
TypeError: Cannot read property 'substr' of undefined
at Function. (C:\Projects\san-diego-house\node_modules\source-map\lib\source-node.js:95:30)
at Array.forEach (native)
at SourceMapConsumer_eachMapping [as eachMapping] (C:\Projects\san-diego-house\node_modules\source-map\lib\source-map-consumer.js:155:14)
at Function.SourceNode_fromStringWithSourceMap [as fromStringWithSourceMap] (C:\Projects\san-diego-house\node_modules\source-map\lib\source-node.js:80:24)
at SourceMapSource.node (C:\Projects\san-diego-house\node_modules\webpack-sources\lib\SourceMapSource.js:42:20)
at ReplaceSource.node (C:\Projects\san-diego-house\node_modules\webpack-sources\lib\ReplaceSource.js:69:29)
at CachedSource.node (C:\Projects\san-diego-house\node_modules\webpack-sources\lib\CachedSource.js:12:23)
at C:\Projects\san-diego-house\node_modules\webpack-sources\lib\ConcatSource.js:40:49
at Array.map (native)
at ConcatSource.node (C:\Projects\san-diego-house\node_modules\webpack-sources\lib\ConcatSource.js:39:60)
at C:\Projects\san-diego-house\node_modules\webpack-sources\lib\ConcatSource.js:40:49
at Array.map (native)
at ConcatSource.node (C:\Projects\san-diego-house\node_modules\webpack-sources\lib\ConcatSource.js:39:60)
at C:\Projects\san-diego-house\node_modules\webpack-sources\lib\ConcatSource.js:40:49
at Array.map (native)
at ConcatSource.node (C:\Projects\san-diego-house\node_modules\webpack-sources\lib\ConcatSource.js:39:60)
Mention any other details that might be useful.
The text was updated successfully, but these errors were encountered: