LearnBoost / cluster

Node.JS multi-core server manager with plugins support.
http://learnboost.github.com/cluster
MIT License
2.29k stars 159 forks source link

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

Closed sambs closed 13 years ago

sambs commented 13 years ago

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 commented 13 years ago

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 commented 13 years ago

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