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

Cannot start server on Windows #534

Open
k-ode opened this issue Aug 12, 2016 · 6 comments
Open

Cannot start server on Windows #534

k-ode opened this issue Aug 12, 2016 · 6 comments
Labels
bug An issue with the system

Comments

@k-ode
Copy link

k-ode commented Aug 12, 2016

When writing routes_client.js on Windows, you currently output require-statements with single backslashes - which doesn't work.

A small change to compileClient.js (308) is needed. There's problaby a nicer solution, but this fixed it for me.

const routesContent = routesOutput.join("").split('\\').join('\\\\');
@doug-wade
Copy link
Collaborator

@kimgronqvist I would love to get react server up and building on windows, but I don't have a machine to debug on. We hit some errors trying to set up appveyor to prevent these kinds of compatibility issues from sneaking in. Would you be willing to help us get the build passing on windows?

@k-ode
Copy link
Author

k-ode commented Aug 12, 2016

Sure! On what command is the build failing? I've tried running npm run bootstrap, which worked nicely.

@doug-wade
Copy link
Collaborator

Yay! 🎉

I opened up a pr to add appveyor to the build in my fork, since I'm not sure how to set it up so that it only builds for a single branch and not for a whole repo.

You can see the full logs here, or by following the link in the failing check, but currently its failing npm test with

Error: Command failed: npm run test 
'mocha' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"

I don't really understand why that would be the case, though, since its passing our ubuntu build just fine. The dev dependency we've declared should be added by npm to the path at runtime.

@doug-wade
Copy link
Collaborator

Also, the issue is #316

@gigabo gigabo added the bug An issue with the system label Aug 12, 2016
@gigabo
Copy link
Contributor

gigabo commented Aug 12, 2016

@doug-wade - Looks like there were some build failures higher up.

image

Maybe mocha (or one of its deps) just failed to build?

@DraconPern
Copy link

Related, in react-server-cli/target/compileClient.js there's a few calls to require.resolve where the result is used in a string output. For example, require.resolve("react-server-core-middleware");
The problem is that on windows, the path is something like "C:\xyz\blah\blah". The '' are seen as escape sequences. May be the long term solution is to use webpack?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue with the system
Projects
None yet
Development

No branches or pull requests

4 participants