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

Override the node command when using pnpm run #463

Closed
zkochan opened this issue Nov 3, 2016 · 8 comments
Closed

Override the node command when using pnpm run #463

zkochan opened this issue Nov 3, 2016 · 8 comments

Comments

@zkochan
Copy link
Member

zkochan commented Nov 3, 2016

Frequently there are actions made with node in scripts. When dependencies are installed with pnpm, it is recommended to run node with the --preserve-symlinks option.

The easiest solution might be to override the run command in pnpm. The pnpm version of the run command would run all the node commands in scripts with the --preserve-symlinks option

@iamstarkov
Copy link
Contributor

seems fragile

@iamstarkov
Copy link
Contributor

but the only way, i think

@zkochan
Copy link
Member Author

zkochan commented Nov 4, 2016

There will be a better solution once this gets released: nodejs/node#8509 (Configuration option to permanently turn on --preserve-symlinks)

@iamstarkov
Copy link
Contributor

so it will be in next node release?

@zkochan
Copy link
Member Author

zkochan commented Nov 4, 2016

in the 7th for sure. The 6th is under question for now.

@iamstarkov
Copy link
Contributor

6 is LTS now, so i doubt it

@zkochan
Copy link
Member Author

zkochan commented Nov 4, 2016

Here they say they will discuss it. If they decide not to include it, we can implement the hack solution for v6

zkochan added a commit that referenced this issue Nov 8, 2016
From Node.js v7.1.0 it is possible to set the NODE_PRESERVE_SYMLINKS
environment variable to 1 to make Node preserve symlinks.

To leverage this new feature, before passing through to `npm run`, pnpm
sets PRESERVE_SYMLINKS to 1.

Ref #463
zkochan added a commit that referenced this issue Nov 10, 2016
From Node.js v7.1.0 it is possible to set the NODE_PRESERVE_SYMLINKS
environment variable to 1 to make Node preserve symlinks.

To leverage this new feature, before passing through to `npm run`, pnpm
sets PRESERVE_SYMLINKS to 1.

Ref #463
zkochan added a commit that referenced this issue Nov 10, 2016
From Node.js v7.1.0 it is possible to set the NODE_PRESERVE_SYMLINKS
environment variable to 1 to make Node preserve symlinks.

To leverage this new feature, before passing through to `npm run`, pnpm
sets PRESERVE_SYMLINKS to 1.

Ref #463
@zkochan
Copy link
Member Author

zkochan commented Jan 9, 2017

I think we don't need --preserve-symlinks anymore. As of v0.47.0, pnpm should work fine on Node.js 4 without preserve-symlinks. It is used on Node 6 and newer but can be turned off via the preserve-symlinks config.

@zkochan zkochan closed this as completed Jan 9, 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