ngrok icon indicating copy to clipboard operation
ngrok copied to clipboard

TypeScript: Unexpected token

Open AlexChecker opened this issue 3 years ago • 1 comments

when I tries to use ngrok module I catches this error:

ERROR in ./~/ngrok/~/got/dist/source/as-promise/index.js
Module parse failed: c:\Users\rooth\Desktop\glor io\glorio-client\node_modules\ngrok\node_modules\got\dist\source\as-promise\index.js Unexpected token (89:32)
You may need an appropriate loader to handle this file type.
|                         response = await hook(response, async (updatedOptions) => {
|                             const typedOptions = core_1.default.normalizeArguments(undefined, {
|                                 ...updatedOptions,
|                                 retry: {
|                                     calculateDelay: () => 0
 @ ./~/ngrok/~/got/dist/source/index.js 132:13-36
 @ ./~/ngrok/src/client.js
 @ ./~/ngrok/index.js

Before this I fixed trouble with fs and child-process packages that are not available in npm, but now I am out of ideas? why i got this error

AlexChecker avatar Aug 26 '21 12:08 AlexChecker

That's weird, the issue seems to be in the dependency got (which itself is written in TS). Do you get the same if you just require and try to use got?

philnash avatar Aug 26 '21 23:08 philnash

I'm going to close this issue as there hasn't been an answer to my question. If this is still a problem, please feel free to reopen.

philnash avatar Aug 16 '22 05:08 philnash