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

Build error with older gatsby and newer gatsby link #13836

Closed
m-allanson opened this issue May 3, 2019 · 0 comments · Fixed by #13839
Closed

Build error with older gatsby and newer gatsby link #13836

m-allanson opened this issue May 3, 2019 · 0 comments · Fixed by #13839
Assignees
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@m-allanson
Copy link
Contributor

Description

Installing a Gatsby version older than 2.4.0 will install a newer version of Gatsby Link that's incompatible with the older Gatsby.

Steps to reproduce

  • gatsby new repro https://github.com/m-allanson/assetpath-issue
  • yarn
  • gatsby build

Expected result

The site should build.

Actual result

Build error:

success Building production JavaScript and CSS bundles — 5.380 s

error Building static HTML failed for path "/"

See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html

  29 |
  30 | function withPrefix(path) {
> 31 |   return normalizePath(__BASE_PATH__ + "/" + path);
     | ^
  32 | }
  33 |
  34 | function withAssetPrefix(path) {


  WebpackError: ReferenceError: __BASE_PATH__ is not defined

  - index.js:31 withPrefix
    [lib]/[gatsby-link]/index.js:31:1

Environment

  System:
    OS: macOS 10.14.4
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.15.1 - ~/.nvm/versions/node/v10.15.1/bin/node
    Yarn: 1.15.2 - /usr/local/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.15.1/bin/npm
  Languages:
    Python: 3.5.3 - /Users/mike/.pyenv/shims/python
  Browsers:
    Chrome: 73.0.3683.103
    Firefox: 66.0.3
    Safari: 12.1
  npmPackages:
    gatsby: 2.3.36 => 2.3.36
  npmGlobalPackages:
    gatsby-cli: 2.5.12
@m-allanson m-allanson added status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: bug An issue or pull request relating to a bug in Gatsby labels May 3, 2019
@DSchau DSchau self-assigned this May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants