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

Fixed "aSourceMapConsumer.eachMapping is not a function" #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mars-dlx
Copy link

This fixed the issue #31.
This solution should work in Webpack 2/3/4.

I can not test this solution today, because I do not have a project on angularjs. But I will test it on work project on Monday and report the result.

@mars-dlx mars-dlx changed the title #31: Fixed "aSourceMapConsumer.eachMapping is not a function" Fixed "aSourceMapConsumer.eachMapping is not a function" Apr 27, 2019
@mars-dlx
Copy link
Author

This solution is working.
But the source-map package was updated without checking its compatibility, which led to this issue, as well as to the fact that Travis could not run the check. Perhaps this has led to some other issues.

@royalrex
Copy link

@Mar-Ser your fix almost made the plugin work for me.
Instead of the "aSourceMapConsumer.eachMapping is not a function" error, I get an error complaining about elm.injector() returning null and then calling has('$state') on it. Found it out by stepping through the code in the debugger.

Uncaught TypeError: Cannot read property 'has' of undefined
    at HotAngular../node_modules/angular-hot-loader/lib/angular-hot-loader.js.HotAngular.reloadState (angular-hot-loader.js:97)
    at HotAngular../node_modules/angular-hot-loader/lib/interceptors/config.js.module.exports [as config] (config.js:9)
    at Object../src/common/user/user.js (user.js:5)
    at __webpack_require__ (bootstrap:724)
    at fn (bootstrap:101)
    at Object../src/common/common.js (common.js:17)
    at __webpack_require__ (bootstrap:724)
    at fn (bootstrap:101)
    at Object../src/app.js (app.js:17)
    at __webpack_require__ (bootstrap:724)

Any ideas appreciated, would be so great to get HMR working :D

@mars-dlx
Copy link
Author

mars-dlx commented Feb 8, 2020

@royalrex Sorry for I am not answering a long time... I spent much time to trying made it work. But even when it is not throwing errors - it is not do anything. So, I think it wastes time if it can not hot reload anything valuable...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants