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

Absolute Paths don't get resolved #4

Closed
zetixar opened this issue Sep 19, 2017 · 4 comments
Closed

Absolute Paths don't get resolved #4

zetixar opened this issue Sep 19, 2017 · 4 comments

Comments

@zetixar
Copy link

zetixar commented Sep 19, 2017

Absolute Paths don't get resolved right off the bat. npm install works fine but when I do npm start it can't resolve 'store' module path or any other absolute paths.

Maybe there is something wrong with my dev environment, idk.
screen shot 2017-09-19 at 9 18 44 am

@jonidelv
Copy link
Owner

I just tried and is working fine for me, make sure you have this file in the root folder
.env with this content

NODE_PATH=src/

it will make your path absolute to the src folder.

@zetixar
Copy link
Author

zetixar commented Sep 20, 2017

I do have the .env file that automatically gets generated by yo create-redux-app, in the root folder withNODE_PATH=src/ in it, but still it can't help resolving the absolute paths for me.
The only way that I could get it work was to add NODE_PATH=./src to the npm scripts like this: "start": "NODE_PATH=./src react-scripts start".
It seems that the real issue is related to 'create-react-app' itself, e.g. facebook/create-react-app#2230

@jonidelv
Copy link
Owner

Glad you made it work, yeah I think is related to create-react-app.

@zetixar
Copy link
Author

zetixar commented Sep 20, 2017

Since this is not an issue with generator-create-redux-app itself and there is also a semi hacky solution for this -at least for now- I close this.

@zetixar zetixar closed this as completed Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants