Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

startsWith error in Safari 8 #507

Closed
imjared opened this issue Oct 18, 2016 · 2 comments
Closed

startsWith error in Safari 8 #507

imjared opened this issue Oct 18, 2016 · 2 comments

Comments

@imjared
Copy link

imjared commented Oct 18, 2016

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?

@KyleAMathews
Copy link
Contributor

Hmm... bummer this got in — it's startsWith is barely supported... I'll fix it right away and make a new release. Thanks for bring it to our attention.

@KyleAMathews
Copy link
Contributor

Published 0.12.14 with the fix. Run npm install --save gatsby@latest to get it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants