-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Need to add "index.html" to make dev server work #603
Comments
@sebelga Hi. Can you provide more details?
|
Hi @JoelMarcey I have version 1.0.1 of "docusaurus-init" and version "1.0.14" of "docusaurus" in my project node_modules. I can't provide a link as the repo is not public but here is my siteConfig.js (I only made update of some props and commented stuff) /**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// See https://docusaurus.io/docs/site-config.html for all the possible
// site configuration options.
/* List of projects/orgs using your project for the users page */
const users = [
// {
// caption: 'User1',
// image: '/test-site/img/docusaurus.svg',
// infoLink: 'https://www.facebook.com',
// pinned: true,
// },
];
const siteConfig = {
title: 'eUI Documentation' /* title for your website */,
tagline: 'All you ever wanted to know about eUI',
url: 'https://eui.ec.eu' /* your website url */,
baseUrl: '/' /* base url for your project */,
// For github.io type URLs, you would set the url and baseUrl like:
// url: 'https://facebook.github.io',
// baseUrl: '/test-site/',
// Used for publishing and more
projectName: 'eUI',
organizationName: 'European Commission',
// For top-level user or org sites, the organization is still the same.
// e.g., for the https://JoelMarcey.github.io site, it would be set like...
// organizationName: 'JoelMarcey'
// For no header links in the top nav bar -> headerLinks: [],
headerLinks: [
{doc: 'basics-getting-started', label: 'Docs'},
// {doc: 'doc4', label: 'API'},
{page: 'help', label: 'Help'},
// {blog: true, label: 'Blog'},
],
// If you have users set above, you add it here:
// users,
/* path to images for header/footer */
headerIcon: 'img/ec-logo.svg',
footerIcon: 'img/eui-logo.svg',
favicon: 'img/favicon.ico',
/* colors for website */
colors: {
primaryColor: '#4583d7',
secondaryColor: '#1b4986',
},
/* custom fonts for website */
/*fonts: {
myFont: [
"Times New Roman",
"Serif"
],
myOtherFont: [
"-apple-system",
"system-ui"
]
},*/
// This copyright info is used in /core/Footer.js and blog rss/atom feeds.
copyright:
'Copyright © ' +
new Date().getFullYear() +
' European Commission',
highlight: {
// Highlight.js theme to use for syntax highlighting in code blocks
theme: 'default',
},
// Add custom scripts here that would be placed in <script> tags
scripts: ['https://buttons.github.io/buttons.js'],
/* On page navigation for the current documentation page */
onPageNav: 'separate',
/* Open Graph and Twitter card images */
ogImage: 'img/docusaurus.png',
twitterImage: 'img/docusaurus.png',
// You may provide arbitrary config keys to be used as needed by your
// template. For example, if you need your repo's URL...
// repoUrl: 'https://github.com/facebook/test-site',
};
module.exports = siteConfig; When I build the website, I do have the "index.html" generated and it works fine. Thank for your help! |
I can confirm this is happening to me too. Like @sebelga I am also using Windows 7 64-bit. Without copying the index.html files from the build folder, accessing http://localhost:3000 will stall for a long time until a timeout occurs. After performing a fresh installation of docusaurus, I have to:
Then only I can open http://localhost:3000 properly. UPDATE: I believe this affects Windows platform (as the same is happening on Windows Server 2012). I have tried both NodeJS v8 and NodeJS v10. |
Just adding some data here. With fresh install, I use Windows 10 64-bit through its WSL (Windows Subsystem for Linux) and it works fine. Tried using normal command prompt and it works fine as well. I couldn't reproduce the error. |
I don't have Mac but just tested it on Ubuntu 16.04.02 LTS with Node v8.10.0 and it worked fine. Latest Docosaurus is being used |
So this looks like a Windows support issue. There is a PR - #677 - it may not be directly related, but I wonder if it could help. |
It would be very helpful if there is at least a repository in which we can reproduce this bug. If this happens to all windows, then it's obvious that this need to be fixed. Before all of that, @yansern @sebelga can you try forking Docosaurus and try running it in your local server? Just to pinpoint it's not from old version bug
It assume that this only happens on dev server, which is related to Express server routing. |
Hi @JoelMarcey & @endiliey, I have figured out the issue and it is proxy related. I'm running behind corporate proxy and I have I noticed that under What happens is that this Looking up the docs for The solution is just to set localhost to the NO_PROXY environment variable:
Other tips:
|
Sorry I haven't replied to previous messages. @yansern effectively I am behind a corporate proxy with HTTP_PROXY env vars set. 😄 And your fix worked indeed! SET NO_PROXY=localhost Thanks! |
That should be it then. I guess we can close this issue. Horaay 😀. Another thing is @yansern or @sebelga do you want to submit a doc PR for this ? I think that will be helpful. Cc @JoelMarcey |
Yeah sure I can do it. Should I include it in the "Installation" section? https://docusaurus.io/docs/en/installation.html |
Glad this is resolved. And thanks for #688 😄 |
Hi,
In my dev environement I need to add "/index.html" to
Otherwise I get a server timeout error (the page does not defaults to "index.html").
Any idea why that might be happening?
Cheers.
The text was updated successfully, but these errors were encountered: