opentripplanner / otp-ui

React component library, which can be used to build trip planner webapps.
http://www.opentripplanner.org/otp-ui/?path=/story/transitvehicleoverlay--real-time-rectangles
MIT License
54 stars 34 forks source link

Error calling getUserTimezone() #152

Open binh-dam-ibigroup opened 4 years ago

binh-dam-ibigroup commented 4 years ago

EDIT: updated for OTP-RR 1.0.0-beta.0

In project https://github.com/ibi-group/trimet-mod-otp, during initial UI load, the UI fails to load, resulting in this error message in the browser console:

time.js:110 Uncaught TypeError: Cannot read property 'guess' of undefined
    at getUserTimezone (time.js:110)

To reproduce:

The UI should fail to load with the browser console error above.

package.json:

  "dependencies": {
    "connected-react-router": "^6.5.2",
    "core-js": "2",
    "es6-math": "^1.0.0",
    "history": "^4.7.2",
    "leaflet": "^1.6.0",
    "leaflet.polylinemeasure": "github:ppete2/Leaflet.PolylineMeasure",
    "otp-react-redux": "^1.0.0-beta.0",
    "react": "^16.9.0",
    "react-bootstrap": "^0.32.1",
    "react-dom": "^16.9.0",
    "react-ga": "^2.5.7",
    "react-leaflet": "^2.6.1",
    "react-redux": "^7.1.0",
    "react-router": "^5.0.1",
    "redux": "^4.0.4",
    "redux-logger": "^2.8.1",
    "redux-thunk": "^2.3.0",
    "regenerator-runtime": "^0.13.2",
    "styled-components": "^5.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.1.0",
    "@babel/plugin-proposal-class-properties": "^7.1.0",
    "@babel/plugin-transform-template-literals": "^7.0.0",
    "@babel/preset-env": "^7.1.0",
    "@babel/preset-react": "^7.0.0",
    "babel-loader": "^8.0.2",
    "babel-preset-stage-0": "^6.24.1",
    "css-hot-loader": "^1.4.4",
    "css-loader": "^1.0.0",
    "fs-extra": "^8.1.0",
    "html-webpack-plugin": "^3.2.0",
    "mini-css-extract-plugin": "^0.4.1",
    "node-sass": "^4.9.2",
    "optimize-css-assets-webpack-plugin": "^5.0.0",
    "react-hot-loader": "React 16.9",
    "sass-loader": "^6.0.3",
    "style-loader": "^0.22.0",
    "terser-webpack-plugin": "^3.0.6",
    "uglifyjs-webpack-plugin": "^1.2.7",
    "webpack": "4.16.5",
    "webpack-cli": "^3.1.0",
    "webpack-dev-server": "^3.1.11",
    "yaml-loader": "^0.5.0"
  }
binh-dam-ibigroup commented 4 years ago

This issue is seen by transpiling https://github.com/opentripplanner/otp-react-redux into https://github.com/ibi-group/trimet-mod-otp.