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.

[Bug] Path with dot doesn't work

See original GitHub issue

Reporting a bug?

Routes that contain a dot give the error Cannot GET [path]. I’m upgrading from a much older version of react-static and this used to work.

Environment

$ npx envinfo --system --npmPackages react* --binaries --npmGlobalPackages react* --browsers
npx: installed 1 in 2.21s

  System:
    OS: Windows 10 10.0.18362
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 3.08 GB / 15.90 GB
  Binaries:
    Node: 10.16.3 - C:\Program Files\nodejs\node.EXE
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
    Internet Explorer: 11.0.18362.1
  npmPackages:
    react: ^16.9.0 => 16.12.0
    react-dom: ^16.9.0 => 16.12.0
    react-router: ^5.1.2 => 5.1.2
    react-router-dom: ^5.1.2 => 5.1.2
    react-static: ^7.2.0 => 7.2.3
    react-static-plugin-react-router: ^7.2.3 => 7.2.3
    react-static-plugin-sass: ^7.2.2 => 7.2.2
    react-static-plugin-sitemap: ^7.2.0 => 7.2.3
    react-static-plugin-source-filesystem: ^7.2.0 => 7.2.3

Steps to Reproduce the problem

  1. Create a basic template.
  2. Create a route such as
{
    path: "foo.bar",
    template: "src/pages/foobar"
}
  1. Run the site and try to go to the URL /foo.bar.

Expected Behavior

Dots in the URL should not cause an error.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
JoshClosecommented, Jan 16, 2020

Thanks for the info. Yes my site works when those lines are removed.

1reaction
JoshClosecommented, Jan 15, 2020

I’m using react-static for a documentation site. The URL paths I use have dots in them, and it really needs to stay like this. For example https://joshclose.github.io/CsvHelper/api/CsvHelper.Configuration.Attributes/ I would like a person to be able to type an API into the URL and it to come up.

This is currently running on an older version of react-static and I’m upgrading it. How did it used to work?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Precise Technique Not Working With TR/DoT - Forum
Precise Technique keystone doesn't work with Toxic Rain's DoT as it should. --- Character: Shadow, Lvl28 ... Not a bug.
Read more >
Bug #74061 :: Built-in server assumes path with dot is a file
Bug #64144: Process pending buildreqs during the API call that generates them. (pecl-caching-memcache/3); Don't use eregi since it was removed ...
Read more >
[Bug] Folder name starting with a dot - TechNet - Microsoft
it is a bug because nowhere you can find a official document which say dot cannot be used for starting a folder names....
Read more >
Relative Paths in file links don't work (incorrect handling of ...
Edit: a temporary workaround is to use the fact that “.” folder is consistently a relative file path and systematically resolves to “assets/path ......
Read more >
Bug with directories ending with dots - 7-Zip - SourceForge
You can say that there is similar situation with long path (longer than 255 characters). But there is difference. Windows API doesn't work...
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