Node: Configuration option to permanently turn on --preserve-symlinks

Created on 13 Sep 2016  路  5Comments  路  Source: nodejs/node

Developing packages with peer dependencies is really really hard, I lose so many hours a day trying to setup my dev environment in just the right way so it works.

I've only once managed to get the NODE_PATH=./node_modules workaround working, I'm not sure why it doesn't work for me, perhaps it's to do with how I configure webpack.

That flag would save me when developing locally except it doesn't seem to work with webpack and browserify, is there anyway we can permanently configure it to on so we don't have to pass it as an argument for every node process? That way webpack and browserify would work with it.

feature request module

Most helpful comment

It should be possible to add support for environment variable NODE_PRESERVE_SYMLINKS.

Just like existing variables NODE_DISABLE_COLORS with value 1 or NODE_ICU_DATA as an alternative to --icu-data-dir option.

All 5 comments

you could rename your node binary to something else and then create a shell script (named node) that passes all arguments to the real node binary and appends the --preserve-symlinks flag

That's a nice idea, thanks, I'll try that.

It should be possible to add support for environment variable NODE_PRESERVE_SYMLINKS.

Just like existing variables NODE_DISABLE_COLORS with value 1 or NODE_ICU_DATA as an alternative to --icu-data-dir option.

That would be a nicer solution

This would be a huge help for us too

Was this page helpful?
0 / 5 - 0 ratings

Related issues

willnwhite picture willnwhite  路  3Comments

mcollina picture mcollina  路  3Comments

dfahlander picture dfahlander  路  3Comments

akdor1154 picture akdor1154  路  3Comments

vsemozhetbyt picture vsemozhetbyt  路  3Comments