Skip to content

TransformError on React Native #2

@SastraNababan

Description

@SastraNababan

I tried this module on react native and got this error :
Transform Error : require() must have a single string literal arguments

simulator screen shot - iphone 8 - 2017-12-21 at 09 30 50

index.js
import Marketcloud from 'marketcloud-node'

.babelrc

  "presets": ["babel-preset-expo"],
  "env": {
    "development": {
      "plugins": ["transform-react-jsx-source"]
    }
  }
}

package.json

  "name": "ecommerce",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "jest-expo": "23.0.0",
    "react-native-scripts": "1.8.1",
    "react-test-renderer": "16.0.0"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "node node_modules/jest/bin/jest.js --watch"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "expo": "^23.0.4",
    "faker": "^4.1.0",
    "intl": "^1.2.5",
    "marketcloud-node": "^2.2.0",
    "native-base": "^2.3.5",
    "prop-types": "^15.6.0",
    "react": "16.0.0",
    "react-native": "0.50.3",
    "react-navigation": "^1.0.0-beta.21",
    "react-redux": "^5.0.6",
    "redux-thunk": "^2.2.0"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions