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

Doesn't work with Node.js v17.0.1 #254

Closed
n0bisuke opened this issue Oct 26, 2021 · 14 comments · Fixed by #263
Closed

Doesn't work with Node.js v17.0.1 #254

n0bisuke opened this issue Oct 26, 2021 · 14 comments · Fixed by #263

Comments

@n0bisuke
Copy link

$ ngrok http 3000
[1]    1301 killed     ngrok http 3000

Is there anyone with a similar phenomenon?

Here is a memo for myself.

https://zenn.dev/n0bisuke/scraps/e24fc3651b350c

@conneryn
Copy link

conneryn commented Oct 28, 2021

We are also seeing this issue! It affects the entire command, even --version, but appears to only affect mac users.

On MacOS (tried both M1 and Intel systems):

~$ nvm use 17
Now using node v17.0.1 (npm v8.1.0)
~$ npx ngrok --version
[1]    54015 killed     npx ngrok --version

While on Linux (Ubuntu in this case), it still works:

~$ nvm use 17
Now using node v17.0.1 (npm v8.1.0)
~$ npx ngrok --version
ngrok version 2.3.35

@nsainaney
Copy link
Contributor

I have narrowed this issue to decompress-zip on node v17.0.1:

import DecompressZip from 'decompress-zip'
import extract from 'extract-zip'
import path from 'path'

extract('ngrok.zip', { dir: path.resolve('~/ezip')}).then(_ => console.log('DONE'))

var unzipper = new DecompressZip('ngrok.zip')

unzipper.on('error', function (err) {
    console.log('Caught an error');
});

unzipper.on('extract', function (log) {
    console.log('Finished extracting');
});

unzipper.on('progress', function (fileIndex, fileCount) {
    console.log('Extracted file ' + (fileIndex + 1) + ' of ' + fileCount);
});

unzipper.extract();

The ngrok in ./ezip/ngrok works but the one extracted using decompress-zip fails.

@philnash
Copy link
Collaborator

Ah, interesting. Thanks for investigating @nsainaney and for raising the issue with decompress-zip.

Will wait to see what the decompress-zip project says. Though extract-zip does look like a useful replacement.

@nsainaney
Copy link
Contributor

@philnash - just submitted a PR for this. Would appreciate it if it could get reviewed, merged, and published. Thank you

@nsainaney
Copy link
Contributor

Between the PR and nodejs/node#40702, I have tested the package on Node 17 and everything seems to work now

@philnash
Copy link
Collaborator

philnash commented Nov 3, 2021

Hey @nsainaney, sorry I haven't got to the PR yet. What is the relevance of nodejs/node#40702 to this though? I'm not sure I see a connection.

@nsainaney
Copy link
Contributor

nsainaney commented Nov 3, 2021

@philnash, we were using an axios based client that was initialized with http://localhost:4040/. You are not doing that so the nodejs issue is not relevant to your repo. You can disregard my comment. Sorry for any confusion.

@philnash
Copy link
Collaborator

philnash commented Nov 3, 2021

Ha, ok. I'll get to the PR review later. Thanks!

@johnlindquist
Copy link

I just ran into this issue as well. Have you had a chance to look into the PR?

@KylChiang
Copy link

just try to download(https://ngrok.com/download) the M1 zip file and drop the ngrok.exec file into "/opt/homebrew/bin/", finally it works!

@1xtr
Copy link

1xtr commented Dec 14, 2021

I have some issue on win10 and macos. I solved it with replacing bin files in node_modules with files from ngrok.com
i have lates node version

@Alynva
Copy link

Alynva commented Jan 15, 2022

I'm having the same issue. My bin/ngrok has this content:

stub to allow npm symlink before postinstall starts

Looking that file here in the repo, looks like it's actually with the wrong version of it.

I don't think that should be the content of the file.

@philnash
Copy link
Collaborator

The fix for this has been released as part of version 4.3.0 on npm now.

@n0bisuke
Copy link
Author

Thank you so much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants