eticav / elm-pouchdb

Elm binding to the javascript pouchdb library
BSD 3-Clause "New" or "Revised" License
27 stars 9 forks source link

ReferenceError: _eticav$elm_pouchdb$Native_ElmPouchdb is not defined #12

Open frpaulas opened 6 years ago

frpaulas commented 6 years ago

I have ./elm-stuff/packages/eticav/elm-pouchdb/1.05/ available. In my elm-package.json has "eticav/elm-pouchdb" : "1.0.0 <= v < 2.0.0" the app builds correctly (elm-app start) But when the home page in the SLA is loaded I get the above error.

Not sure what I did wrong or how to proceed. Any suggestions?

Thanks for the help! p

eticav commented 6 years ago

Hi Paul,

The library contains a Native module. Evan and Elm team will not validate librairies with Native code anymore. Therefore, I will not maintain this library anymore altought I had a very pleasant time doing some apps with it.

Your issue is due to the fact that it's not a valid package therfore using it demands a bit of hacking. To solve it, you need to open the js files and do some replacement at the very top of the files with something similar to:

var ecav$elm_pouchdb$Native_ElmPouchdbChange = function() { // var _user$project$Native_ElmPouchdbChange = function() {

Yopu may also read issue #1 .

Hope this will help. Etienne

frpaulas commented 6 years ago

Apologies. I completely missed your response. Will give it a go.