Skip to content

startsWith error in Safari 8 #507

@imjared

Description

@imjared

using Gatsby v1.0.0
I was unable to locate gatsby-node.js, gatsby-browser.js. package.json is as follows:

{
  "name": "gatsby-starter-default",
  "description": "Gatsby default starter",
  "version": "1.0.0",
  "author": "Kyle Mathews <[email protected]>",
  "dependencies": {
    "btoa": "^1.1.2",
    "front-matter": "^2.0.7",
    "gatsby": "^0.12.12",
    "highlight.js": "^9.6.0",
    "history": "^2.0.2",
    "js-yaml": "^3.6.0",
    "markdown-it": "^7.0.1",
    "markdown-it-abbr": "^1.0.3",
    "markdown-it-attrs": "^0.6.3",
    "markdown-it-deflist": "^2.0.1",
    "markdown-it-footnote": "^3.0.1",
    "markdown-it-sub": "^1.0.0",
    "object-assign": "^4.1.0",
    "react-autosuggest": "^6.0.4",
    "react-headroom": "^2.1.2",
    "react-helmet": "^3.1.0",
    "react-responsive-grid": "^0.3.3",
    "react-typography": "^0.12.0",
    "slugify": "^1.0.2",
    "toml-js": "0.0.8",
    "typography": "^0.13.0",
    "typography-plugin-code": "^0.13.0"
  },
  "devDependencies": {
    "async": "^2.0.1",
    "babel-eslint": "^7.0.0",
    "csv": "^1.1.0",
    "eslint": "^3.7.1",
    "eslint-plugin-babel": "^3.3.0",
    "eslint-plugin-react": "^6.3.0",
    "gh-pages": "^0.11.0",
    "lodash": "^4.16.3",
    "swig": "^1.4.2"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "main": "n/a",
  "scripts": {
    "start": "gatsby develop",
    "build": "gatsby build",
    "deploy": "node bin/schoolgenerator.js && gatsby build --prefix-links && cp CNAME public/ && gh-pages -d public",
    "deploy-dry": "node bin/schoolgenerator.js && gatsby build",
    "develop": "gatsby develop",
    "test": "echo \"Error: no test specified\" && exit 1"
  }
}

Possibly similar to #264, we're seeing an issue in Safari 8 when loading config.toml in production:

TypeError: undefined is not a function (evaluating 'o.startsWith("/")'). The trace only shows a line in config.toml but the error doesn't really seem related to the output.

The error output is minified so it's not the most helpful but I think it traces back to these lines

Maybe we can change that instance to use the Lodash variation _.startsWith that's used elsewhere?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions