I'm trying to use moment.js in my script but get a 'Uncaught ReferenceError: moment is not defined' error. I made sure that it was present in the libraries under Server Code. What am I doing wrong?
I'm trying to use moment.js in my script but get a 'Uncaught ReferenceError: moment is not defined' error. I made sure that it was present in the libraries under Server Code. What am I doing wrong?
Hello Shruti,
How do you add this library?
Do you follow https://devcenter.appery.io/documenta...?
Hi Jiorgio,
Tried the same and it works correctly.
Please check whether you have:
1 any console errors.
2 edited page sources(in sources tab).
Regards.
You mean that you downloaded moment.js without source code errors?
I really can't understand.
I pressed "Create JavaScript" button and the moment.js source code is appeared on the screen with the error reported in the above screen. No edit.
I tried using Appery.io in chrome, safari and firefox.
Always the same result: code error.
No errors in the console log.
Sto per piangere ...
Can you try to do import this inside my app?
Just to be sure ... i'm stupid.
This is what happens to me: https://youtu.be/LieziuGwLVw
The app is shared with the support.
The name is "CarAngel"
This is the editing link
http://appery.io/app/project/f3da3ecd...
Thanks in advance.
Solved: adding
http://momentjs.com/downloads/moment.js
in Project -- App settings -- User-defined resources
seems to be working ...
Not so clear why but ... in Appery.io I trust
)
Glad it works now. Thanks for update, Giorgio!
I was able to use moment by placing it at the top. I used npm install moment for my website https://madayerweb.co.ke.