Hacker News new | past | comments | ask | show | jobs | submit login

The obvious thing is what most other environments do: there's a system default search path, you can override that using an environment var, and then once your runtime is up, you can further override it via an API at runtime. E.g. with ruby there is an array called $: which is the current search path in array-of-strings form, and manipulating that array affects the module loading behavior. This provides a lot of flexibility in how apps find their modules. Node provides basically none.

Dictating that the only way to control dependency-loading is by manipulating the filesystem is really braindead.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: