简体   繁体   English

未捕获错误:中继转换错误

[英]Uncaught Error: Relay transform error

We are facing a problem with Relay/GraphQL/React in production. 我们在生产中遇到了Relay / GraphQL / React的问题。 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: 在master中测试时一切正常,但是在生产中我们在控制台中出现以下错误,导致与Relay / GraphQL / React相关的所有内容都不起作用:

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: 这是我的package.json以防它有帮助:

{
  "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. 只是为了记录,我需要将Node.js更新到最新版本,以便一切都能再次运行。 Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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