1

我们在生产中面临 Relay/GraphQL/React 的问题。在 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.

我们认为这与应用程序在部署时的构建有关,但是我们不知道从哪里开始。

这是我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"
  }
}
4

1 回答 1

0

只是为了记录,我需要将 Node.js 更新到最新版本,以便一切正常工作。谢谢。

于 2016-07-21T02:49:28.113 回答