In js file, i used import to instead of require
import co from \'co\';
And tried to run it directly by nodejs since it said import is \'shi
if you use the preset for react-native it accepts the import
npm i babel-preset-react-native --save-dev
and put it inside your .babelrc file
{ "presets": ["react-native"] }
in your project root directory
https://www.npmjs.com/package/babel-preset-react-native