Open geekyme opened 6 years ago
@geekyme hello! Can you please try to use the source files from this commit https://github.com/alepop/elm-notification/tree/3d74f9bb81f7bb2ee1b9326490835cc38516f8aa ?
Ok I just downloaded those source files from that commit.
I setup my project and manually loaded the library into the directory folder:
Now i'm getting this error:
The only way I've found to have work is to copy your source files (Native/Notification.js
and Notification.elm
) out into my project src, and declaring my project with:
native-modules
: true
As shown in https://github.com/gabrielperales/elm-native-module/blob/master/README.md.
Out of ideas how to do this without elm-github-install.
I did the same thing as original poster - as there is no mechanism to publish packages locally (wo lots of npm/grunt/bower .js ninja tools)
i think the problem lies in Notification.js (i might be wrong) :
var _z_alepop$elm_notification$Native_Notification = function() {
...which does not correspond the provided namespace in the project given by the github url in elm-package.json:
"repository": "https://github.com/alepop/elm-notification.git",
...elm beliews the namespace is "alepop" and will try to refer to the native binding with "_alepop" in the generated .js code.
Interresting thing is that the "_z" probebly is there for a reason. If we correct the Notification.js to have prefix "_alepop" we still get the error. It seems the order of code comes in to play. By changing the github url to "z_alepop" and leave Notification.js as is - it works.
PS. ...also remember the notiifcations api only works on a legit host - just running it from a file path will not work properly DS.
I downloaded the dependency manually and added it into elm-stuff and updated exact-dependencies.json. I couldn't use https://github.com/gdotdesign/elm-github-install as I am on cygwin.
elm-package.json:
elm-stuff/exact-dependencies.json:
When I run the project, I get following runtime error:
All my other dependencies work