All, I am trying to using third party NodeJS SDK in Titanium Studio. However, I consistently encounter dependency issues, such as util.js, utils.js, ms.js, events.js etc. I tried to add the missing module manually, but it looks like it will become un-tractable as there are so many dependencies.
My questions are :
1. Is that possible to use NodeJS based SDK in Titanium Studio .
2. If so, what is the right approach to include the dependencies.
Thanks a lot!
Titanium can't get Coffee scripts to work natively (assuming you want to deploy the TitaniumWrapper.coffee). A possible solution you may want to try is hooking a plugin http://billdawson.com/titanium_coffee_script/ in order to pre-compile Coffee scripts.
You can also try to embed everything using a Tiwebview that wraps HTML to load mojio-js.js but you would still need to observe events mojio client (like replacing keys, login an user and create a few model instances).
Hope you find the info useful and can serve for further research.
Related
i will try to give you a little of context.
With my team we are trying to migrate MUI v3 to v4 in a reactJs project. We did it with the project itself and it works! but, some kind of problems came up when we navigated to certain windows that use a certain library to work.
This library was developed by other guy that is not in the company anymore and we are not in touch neither, but, we have access to the library GitHub repository, them are two actually.
https://github.com/rjpizarro/forms
https://github.com/rjpizarro/make-request
i've never had to do this so, i decided to clone the project then install the dependencies and run it.
I'm using nvm so in that moment i was working with node v12 and i got some errors when i executed the npm start ("start": "webpack --watch").
If i use node 10 the scrips runs perfectly but in the entire project we are using node 12 so i'm not sure what is the problem here.
i'm wonder if it could be a problem when i'll try to migrate from MUI v1 to v4 and use the modified library into my project again, or in first place, why its working rigth now?
Anyway i just wanted to know, just if i need it, Could i use different versions of node in a library and then use other newer version into the entire project?
Could this make some negatives effect into my entire project?
Which is the best way to migrate MUI into this library and put it in my project again?
Each nodejs process (including all the modules/libraries it loads) has exactly one version of nodejs running. It isn't possible to have two separate versions of nodejs in the same process each running different parts of the code.
You could make two separate nodejs apps that each run under a different version of nodejs that communicate with each other via some interprocess communication, but they have to be two separate applications/processes.
If you want to run everything in one process (on one version of nodejs), then you will need to test and fix all your libraries to run on that one version of nodejs.
I have a simple project of viewer on NodeJs: https://github.com/Autodesk-Forge/viewer-nodejs-tutorial with some basic exstention. I want to know how can I add the new extention from https://github.com/jeremytammik/forgefader to my project?
ForgeFader is based on React and uses ES6 syntax, One way to get started will be taking a look at the React Boiler plates we have in order for you to start getting familiar with it. https://github.com/Autodesk-Forge/forge-react-boiler.nodejs
After you are able to use this, you will be able to start checking the extension code in order to be able to use it in your project, It will require some work on your side, unfortunately this is not a plug and play extension like the ones used in the basic NodeJs tutorial.
Jeremy has done a great work documenting all his steps in the readme of the Fader repo you already have, I would suggest going over it.
i have built a microservices application using NodeJs . i have building this app for 4 month now and it starts to be big. i have used private modules to share code between the services but now i face anther problem.
i am getting duplicate code for requiring this modules(and public modules) as many of them are being used in all the services and are called in my index file.
so what i have try to do is build anther private module that it`s purpose is to include all this modules dependencies and control all the updates .
that works good, the problem is the IDE "phpstorm" screams on me because now those dependencies are not in the service package.json and also i dont have autocomplete on them(same reason) .
is there a way to let the package json to use this dependencies from that package , or maybe anther technique to achieve this
IntelliJ might be providing a separate IDE for node js could you look at it, I use Atom or VS code(sometimes) for node related stuff. Maybe take a look at this as well.
I am working on node js application and it is now ready to use. I want to make exe of this application so that it can be used for commercial usage.
Up to now I have used enclose module using which I have compiled the code of application but I have found some issues in that (app got crash on idle condition). App is running good without enclose or compiled code.
I have searched on google and found some alternate modules like JXcore, Node webkit and Electron etc. but JX core giving error same as in SO question.
In node web-kit, it's functionality is not looking suitable as we need its executable and some dll's along with our code, which makes our package bulky.
I have also tried jxcore. The main problem with the exe's and with modules that we use is their ability to work with native modules, in my case the Kinect.node module. This module cannot be compiled. We need a workaround to package only this along with our .exe file. Enclose provides this workaround in its inbuilt functionality.
Also looking a response from EncloseJS, which is actually run by just one person who gives further instructions upon purchase. A purchase is needed for commercial usage.
In case of Electron, It is supporting only Electron-based application source code. So If I choose this then I have to modify my application code.
So can any one suggest me what can I do to make exe file from node js code there?
Thank you!
I had the same issue before, the node js application close when running in background. now i am using process manager2 (pm2), it is working fine and if the application is crash due to any other reason it is automatically started again.
I have gotten my answer:
First, reason was DiskDB database, it was not compatible with the node webkit so that is why I was getting error of native modules.
Now I am using sqlite3 module for local database. It is better than DiskDB.
Second, One reason was free version of enclose, Paid version of Enclose JS module ignores the timeout issue which I was getting.
This way I have resolved my question.
We are looking into migrating our Objc Application to an Electron one, since the native one is just a WebWrapper around a website already.
We are missing one important feature: the ability to use QuickLook to preview files.
We managed to wrap qlmanage (Quick Look Server debug and management tool) in a npm module (based on this older code) but this is not the same as using QLPreviewPanel.
qlmanage launches an app in the Dock, and can spawn multiple instances of it, unlike QLpreviewPanel.
Does anyone managed to use Quicklook properly with Electron?
Is it possible to create a npm module in C++ using the Foundation Framework from Apple, and then requiring this module from Electron?
Any insight would be greatly appreciated.
We ended up adding this feature directly in Electron.
This will be released soon on the BrowserWindow api, with the following method signature:
previewFile(path [,displayname])
This way everyone gets to use it!