Full disclosure: DYMO has their own javascript based label printing module but there are two problems with it: 1) It does not work with Node.js and 2) it is minified and obfuscated.

So, I wrote my own library.  https://github.com/dsandor/dymojs

I searched for a suitable module and found something on npm but to my dismay it just wrapped the .NET SDK.  A little poking around and some network inspection I found that the folks at DYMO simply wrote a REST service that wraps their C# library and run it via mono on Mac and .NET on Windows.  I captured some calls to figure out how it worked and determined there are really only two calls that matter: GetPrinters and PrintLabel.

Both functions are exposed in the dymojs module.

Check out the tests directory in the repo for an example of printing a test label.

Enjoy!

This post pertains to React Native v0.12.0-rc.

I am attempting to port my iOS app in react-native to Android. I am experiencing a bunch of issues surrounding colors and default styles. I am getting TypeError: expected dynamic type ‘string’, but had type ‘int64’.

Attached the debugger to the processes and I am seeing calls to the following code in CatalystStylesDiffMap.class:

Examining the values I see the color property is an int64.

As it turns out the Android project and the node-module for react-native were out of sync and this caused lots of problem with regard to style color properties.

It looks like my application (even when initing a fresh app) was importing java libraries for 0.11 dependencies:

I verified my installed version of react-native

init’ed a new project and looked at the build.gradle file to see it is 0.11+.

Checked the node_modules/react-native/Libraries/StyleSheet to see 0.11 files (0.12+ has a new processColor.js file in it as seen by recent commits.)

So to make this work I changed the build.gradle to 0.12+, and ran npm i react-native@0.12.0-rc to force the correct android libraries and the correct react-native module. Now the app works.

Is this my machine or npm cache that is horked up or is it an npm install problem with the 0.12.0-rc? I also noticed that none of the files in the $PROJECTDIR$/android folder get updated when doing an npm i or npm update which leaves the native app setting behind in version.