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

Fix 599: use path.join instead of string concatenation #601

Merged
merged 1 commit into from
Aug 22, 2016

Conversation

doug-wade
Copy link
Collaborator

Fix #599


module.exports = {
routes: {
HelloWorld: {
path: ['/'],
method: 'get',
page: './pages/hello-world',
page: path.join('.', 'pages', 'hello-world'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:squint:

I'm so confused by windows.

I thought forward slashes were actually okay now, but you might receive backslashes from getters?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the error was Module not found: Error: Cannot resolve module '..pageshello-world' in C:\mydev\reactserver__clientTemp. What sticks out to me is that there are no slashes in the error message at all, which makes me think that the / is being interpreted as an escape character. I'm hoping that path.join has the logic to do the right thing.

@gigabo
Copy link
Contributor

gigabo commented Aug 22, 2016

Thanks @doug-wade. 👍

@gigabo gigabo merged commit db55f26 into redfin:master Aug 22, 2016
@gigabo gigabo added the bug An issue with the system label Aug 22, 2016
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

Successfully merging this pull request may close these issues.

2 participants