So i just installed monaca by following this doc from onsen website. But when i do the second step i always get this error:
[ReferenceError: Promise is not defined]
Tried everything on the internet but it seems like all the question is not relevant to onsen ui. So i decided to ask.
You are correct - the problem doesn't seem to come from Onsen UI.
Most likely during the monaca create command the code is trying to use native promises, but wasn't able to find them.
Make sure that you have node version which is at least 0.12 and you should be fine.
Related
Since fabric js doesn't support tree-shaking via es6 modules for bundle size reduction i tried to do a custom build of fabricjs via website (http://fabricjs.com/build/) and via command line build and can't figure out which modules I need as I keep getting errors. I use
node build.js modules=text,circle,image,rect,line,image_filters
since to my understanding I dont use anything else. Then I got an error that sort of indicated I would need to import animation module too - even though I don't use animations from my pov. I did that an indeed the error disappeared and now I get this.drawSelectionBackground is not a function and have no clue to which package it belongs so I wonder hot to figure that out - or do I really have to just go for trial and error?
Figured it out it's the interaction module that I need to import even though I dont use interactions...
Pretty weird...
So before the question I wanna point out that the only thing I could find on this issue was on this stackoverflow question. This issue suggest that this was an issue with wappalyzer, and it was fixed in version 4.0.1. however I am using wappalyzer version 5.1.4 and is up to date with this.
I am building a web-app based on the MEAN-stack, everything worked as intended for a long time, until this error kept poping up in my google-chrome console:
Everytime i would click in my app header, and use my front-end routing to load up different components / modules this error appears, however I dont see any issue with what the web-app presents to me (it's not like I am missing data)
More details on the error:
I have no idea whats going on, or where this issue comes from.
This was due to a failing plugin.
Disable all plugins, and enable them one at a time to find failing chrome extensions.
In this case it was the wappalyzer extension.
Our NoFlo graph components have suddenly compressed themselves all into one uneditable box that says "WaitForward". See attached image.
For a while, this was happening on every browser, except Opera, so I could go in there and update graphs. Then, a couple of weeks later, even Opera wouldn't render the components, so now I am unable to add anymore logic to existing NoFlo forms.
We barely touch code related to NoFlo, so I don't think anything changed in our environment. My theory is that browsers (such as Chrome, which used to be the one stable browser to use for editing) have been updated recently, and this tool needs some kind of an update in order to render properly. Yet I can find no reference to this issue on the NoFlo GitHub instructions, and it doesn't look like anyone is having that issue here on StackOverflow (until now, of course).
The error message in the console says::
"TypeError: this.node.getTransformToElement is not a function"
I plunked this error into Google and saw that others are experiencing this with something called clientIO, and that recent updates to Google Chrome are to blame, as Chrome has recently removed a core feature that allowed related js to function.
But ... how can I fix this? That is the question!
It looks like recent updates to Google Chrome are the culprit.
Taken straight from jointjs.com's website::
Link to announcement from jointjs.com
Announcement: getTransformToElement() polyfill Nov 12th, 2015
Unfortunately, a new version of Chrome (48) removes a feature that is core to JointJS/Rappid. This feature is the SVGGraphicsElement.getTransformToElement() function. The motivation behind removing the method is - according to the Chrome team - open issues about how this method is supposed to behave.
To overcome compatibility issues with future versions of Chrome, we prepared a polyfill that makes sure this method exists. Before a new version of JointJS/Rappid is released (or if you, for any reason, don't want to upgrade), include the following code before you load your application JavaScript:
SVGElement.prototype.getTransformToElement = SVGElement.prototype.getTransformToElement || function(toElement) {
return toElement.getScreenCTM().inverse().multiply(this.getScreenCTM());
};
I was unsure exactly where to put this code in my noflo directory. So I tried putting it at the tippy top of the "app/js/main.js" file. It seems to be working! (But advice for a better location is more than welcome.)
I hope this helps anyone else out there who is experiencing the same issue.
I just downloaded the 30-day trial of IntelliJ IDEA Ultimate Edition and I'm having an issue with the Node.js project I imported.
I am using Mongoose and am using the find and findById methods of my model classes fairly often. Since these methods are provided by mongoose and not actually defined explicitly in my model classes, IntelliJ does not seem to like them. Everywhere that I use the methods, I get an error saying "Unresolved function or method xxx".
I have read several other users stating they had similar issues with Node and WebStorm, but those all seemed to be with the code Node library and all of the answers said to use the Node.js Globals library. I have imported this library and tried downloading both mongodb-DefinitelyTyped and mongoose-DefinitelyTyped from the Libraries screen, and still cannot get the warnings to go away.
I decided it was probably faster to contact JetBrains support since I didn't seem to be getting any quick solutions here. I guess this issue is a bug with IntelliJ IDEA 14 because they had me try the IntelliJ IDEA 15 EAP and it worked fine.
So I guess the solution is to go EAP or just wait for 15 if anybody else has this issue.
I am using a custom require function which mimics nodejs require and it works fine.
However, in electron, I get
SecurityError: An attempt was made to break through the security policy of the user agent.
when calling window.addEventListener inside the custom-required code.
If I could read the source code for electron's 'require' function, I could probably understand why my version fails.
What you are looking for should be on GitHub.
https://github.com/atom/atom
or...
https://github.com/atom/electron
or...
https://github.com/atom/node
Based on your update the code you are looking for (with regard to sharing the global context) is actually here: https://github.com/atom/node/blob/atom-iojs/lib/module.js#L399
Because Electron doesn't include the most current version of Node.js, I thought it worth mentioning.
After inspection with toString, the sources are the same as nodejs except for compilation when Module._contextload is true. This part seems to be optimised away.
My code now works correctly by using compilation sharing the global context and thus behaving as coming from the same origin (XSS prevention in chromium). This is the same functionality as require in electron.