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

Restart and reload clears env, changing require.paths #37

Closed
sambs opened this issue Feb 25, 2011 · 2 comments
Closed

Restart and reload clears env, changing require.paths #37

sambs opened this issue Feb 25, 2011 · 2 comments

Comments

@sambs
Copy link

sambs commented Feb 25, 2011

I'm finding that when my app is restarted, either via the cli or automatically by reload, require.paths is reduced to:
[ '/usr/local/lib/node' ]
down from:
[ '/Users/sam/.npm',
'/Users/sam/.node_modules',
'/Users/sam/.node_libraries',
'/usr/local/lib/node' ]
causing "Cannot find module" errors.

I'm guessing this has something to do with process.ENV being replaced with:
{ CLUSTER_REPLACEMENT_MASTER: '1',
CLUSTER_PARENT_PID: '590',
__CF_USER_TEXT_ENCODING: '0x1F5:0:0' }

@tj
Copy link
Contributor

tj commented Feb 25, 2011

interesting, thanks for the report, I will add some test coverage for this, merge the env instead and see how it goes. I think you are right

@tj
Copy link
Contributor

tj commented Feb 25, 2011

Fixed bug preventing consistent envs. Closed by e7ef8b7 [reported by sambarnes]

This issue was closed.
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