question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when running gatsby build with --prefix-paths

See original GitHub issue

Issue Summary

Trying to use this plugin and deploy to Github Pages (using gh-pages)

Errors

[Error: ENOENT: no such file or directory, open 'public/website-gatsby/sitemap.xml'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'public/website-gatsby/sitemap.xml'
}

[Error: ENOENT: no such file or directory, open 'public/website-gatsby/sitemap-pages.xml'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'public/website-gatsby/sitemap-pages.xml'
}

To Reproduce

  1. add a pathPrefix key/value to gatsby-config.js
  2. gatsby build --prefix-paths

Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?

Technical details:

  • Gatsby Version: 2.10.0
  • Node Version: 12.10.0
  • OS: Mac OSX Mojave

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:15
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
srivastavarnavcommented, Sep 3, 2020

any update on this bug?

3reactions
generalpistoncommented, Feb 23, 2021

@yogeshkotadiya another problem is the relative location of sitemap.xsl. The sitemap files are prefixed with pathPrefix, but the sitemap.xsl is not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I build my site with the —prefix-paths option?
You can set an environment variable named PREFIX_PATHS to true in Gatsby Cloud and your site will be built with the pathPrefix and/or......
Read more >
gatsby-cli - npm
Start using gatsby-cli in your project by running `npm i gatsby-cli`. ... most will want to use the CLI flag ( gatsby build...
Read more >
Deploy gatsby site to netlify with --prefix-paths - Stack Overflow
toml runs the command from package.json which is this: "build": "run-p build:**", "build:app": "gatsby build --prefix ...
Read more >
Gatsby build : files not found / Failed to load resource
But after running gatsby build, your js plugins and fonts are all broken or missing So to fix this, first. ... Then run:...
Read more >
Gatsby v4 build error MDB_PROBLEM: Unexpected problem
Gatsby v4 build error MDB_PROBLEM: Unexpected problem - txn should abort ... "gatsby build --prefix-paths", "build:gh": "npm run clean && npm run build:pp ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found