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

Execution of local bin scripts fails on Windows #652

Closed
targos opened this issue Dec 13, 2018 · 19 comments
Closed

Execution of local bin scripts fails on Windows #652

targos opened this issue Dec 13, 2018 · 19 comments

Comments

@targos
Copy link
Member

targos commented Dec 13, 2018

To reproduce:

citgm bufferutil

It cannot find node-gyp-build. Probably another PATH issue...

@targos
Copy link
Member Author

targos commented Dec 15, 2018

@bzoz any idea? I'm pretty sure process.env.PATH contains the correct node_modules/.bin directory (it's in the npm error log) so I don't know how to debug this further.

@richardlau
Copy link
Member

richardlau commented Dec 15, 2018

Is it only bufferutil that fails (due to node-gyp-build (which is not the usual node-gyp used for native module compilation))?

@targos
Copy link
Member Author

targos commented Dec 15, 2018

I think it's actually more than that. If there is an npm lifecycle script (install, postinstall, prepare) that calls a local dep, it fails.

@targos
Copy link
Member Author

targos commented Dec 15, 2018

I'm going afk now but I will try to create a small module with such a case later to use in our tests

@targos targos changed the title install of native modules fails on Windows Execution of local bin scripts fails on Windows Dec 15, 2018
@targos
Copy link
Member Author

targos commented Dec 15, 2018

See: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1688/nodes=win-vs2017/testReport/junit/(root)/citgm/vinyl_v2_2_0/

This really seems to be a general issue, not only during install.

@targos
Copy link
Member Author

targos commented Dec 15, 2018

@targos
Copy link
Member Author

targos commented Dec 16, 2018

I made a simple bin script module here: https://github.com/targos/citgm-bin-script
I included it in the dependencies of another one here: https://github.com/targos/omg-i-pass-with-local-bin
This passes on Windows and Linux, so the problem is not with all bin scripts. I'm going to check what is different with mocha

@targos
Copy link
Member Author

targos commented Dec 16, 2018

I'm lost...

This passes: citgm https://github.com/targos/omg-i-pass-with-local-bin/archive/master.tar.gz
This fails: citgm https://github.com/archiverjs/node-crc32-stream/archive/master.tar.gz

Both use mocha --reporter dot as npm test script.

@bzoz
Copy link
Contributor

bzoz commented Dec 18, 2018

citgm https://github.com/targos/omg-i-pass-with-local-bin/archive/master.tar.gz fails for me ('citgm-bin-script' is not recognized as an internal or external command)

bufferutil also fails, but https://github.com/archiverjs/node-crc32-stream/archive/master.tar.gz works

@targos
Copy link
Member Author

targos commented Dec 18, 2018

I didn't think this could get even more weird 😆

@bzoz
Copy link
Contributor

bzoz commented Dec 19, 2018

And now (without changing anything in citgm) both citgm https://github.com/targos/omg-i-pass-with-local-bin/archive/master.tar.gz and citgm bufferutil works 🤷‍♂️. Maybe there was a bug in mocha or npm?

@targos
Copy link
Member Author

targos commented Dec 21, 2018

I don't know what to think of it but you're right, everything works now...

@targos
Copy link
Member Author

targos commented Dec 21, 2018

I can reproduce with these:

  • citgm level
  • citgm q

@MylesBorins
Copy link
Contributor

@targos
Copy link
Member Author

targos commented Jan 18, 2019

/cc @refack maybe it rings a bell?

@BridgeAR
Copy link
Member

BridgeAR commented Mar 5, 2019

This happens pretty frequently and the citgm output becomes pretty hard to read that way.

@refack PTAL

@refack
Copy link
Contributor

refack commented Mar 6, 2019

Will do, first thing tomorrow.

@BridgeAR
Copy link
Member

This is still unresolved. I do not have a Windows machine, so I can't look into this.

@refack do you still plan on pursuing this?

@targos
Copy link
Member Author

targos commented Oct 23, 2019

looks like it's not reproducible anymore 🤷‍♂

@targos targos closed this as completed Oct 23, 2019
@targos targos unpinned this issue Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants