ngStorage
ngStorage copied to clipboard
Doesn't work with Browserify
Hello,
When I load your module in my project, I get this error in console:
Uncaught Error: Cannot find module 'angular'
After inspecting the code I saw that the error throw here: https://github.com/gsklee/ngStorage/blob/master/ngStorage.js#L7
I need to do something your module to work with browserify?
Thanks in advance
Shouldn't be anything special. Have you included angular?
Yes,
I've configured the shim for both angular and ngstorage, I also use ui-router and angular-permissions modules with no problem. But when I add your module it throws an error.
To make things work for me I've modified the order of the startup: https://github.com/rafakato/ngStorage/blob/master/ngStorage.js#L1-L11
If there is a angular in the window object I use it instead of loading it from require
.
Again, this works for me, but I didn't make any tests. I've just done this so I can your module. When I have some time I'll try to go deeper in this error.
I have the same issue uglify. Changing the order of startup like rafakato fixed it for me as well.
Unfortunately, it does not helps in my case (
Browserify Error { [Error: Cannot find module 'angular' from <...> bower_components/ngstorage ...
Same here { [Error: Cannot find module 'angular' from <...> bower_components/ngstorage ...