简体   繁体   中英

Uncaught Error: Relay transform error

We are facing a problem with Relay/GraphQL/React in production. When testing in master everything works fine, however in production we get the following error in the console which causes everything related to Relay/GraphQL/React not to be working at all:

Uncaught Error: Relay transform error ``Map is not defined`` in file '/var/app/ondeck/app/react/relay/routes/xxx-route.jsx'. Try updating your GraphQL schema if an argument/field/type was recently added.

We believe is something related to the build of the application when it's getting deployed, however we have no idea where to start looking at.

This is my package.json in case it helps:

{
  "private": true,
  "devDependencies": {
    "babel-eslint": "^6.0.4",
    "eslint": "^2.11.1",
    "eslint-plugin-react": "^5.1.1",
    "webpack-notifier": "^1.3.1"
  },
  "dependencies": {
    "autobind-decorator": "^1.3.3",
    "babel-core": "^6.4.0",
    "babel-loader": "^6.2.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-polyfill": "^6.7.4",
    "babel-preset-es2015": "^6.3.13",
    "babel-preset-react": "^6.3.13",
    "babel-preset-stage-0": "^6.3.13",
    "babel-relay-plugin": "^0.9.0",
    "extract-text-webpack-plugin": "^1.0.1",
    "graphiql": "^0.7.2",
    "graphql": "^0.6.0",
    "isomorphic-fetch": "^2.2.1",
    "node-sass": "^3.3.3",
    "postal": "^2.0.4",
    "react": "^15.1.0",
    "react-dom": "^15.1.0",
    "react-linkify": "^0.1.1",
    "react-notification-system": "^0.2.6",
    "react-relay": "^0.9.0",
    "react-star-rating-component": "^1.0.0",
    "react-stars": "^2.1.0",
    "react-webpack-rails": "^0.4.1",
    "sass-loader": "^4.0.0",
    "webpack": "^1.12.1"
  },
  "scripts": {
    "build": "webpack -p --config webpack/production.config.js",
    "start": "webpack -w --config webpack/dev.config.js",
    "lint": "eslint --ext .js,.jsx app/react/**"
  },
  "license": "",
  "engines": {
    "node": ">= 0.10"
  }
}

Just for the record, I needed to update Node.js to the latest version in order for everything to work again. Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM