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

VCC cannot transpile ngrok #1255

Open
kotekpsotek opened this issue Feb 24, 2025 · 0 comments
Open

VCC cannot transpile ngrok #1255

kotekpsotek opened this issue Feb 24, 2025 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@kotekpsotek
Copy link

kotekpsotek commented Feb 24, 2025

Hi, I've the issue since I've started to use the ngrok for javascript client; It's the tool to tunel public trafic to localhost and the VCC is unnable to transpile to one file project contains ngrok definition/s

My typescript code is:

import grok from "ngrok";

async function run() {
  const url = await ngrok.connect({ port: 8080 }); // trouble belongs to here
  const response = await fetch(`${url}/example`);
// Rest of code... 
}

run()

Error trace:

ncc: Version 0.38.3
ncc: Compiling file index.js into CJS
ncc: Using typescript@5.3.3 (ncc built-in)
Error: Module parse failed: Unexpected token (10:21)
File was processed with these loaders:
 * ../../../../../AppData/Roaming/npm/node_modules/@vercel/ncc/dist/ncc/loaders/empty-loader.js
 * ../../../../../AppData/Roaming/npm/node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js
 * ../../../../../AppData/Roaming/npm/node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js
You may need an additional loader to handle the result of these loaders.
|
| module.exports = {
>   __webpack_require__.ab + "bin",
|   bin,
|   ready,
    at C:\sec\AppData\Roaming\npm\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:23:2001732
    at C:\sec\Roaming\npm\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:23:389111
    at _done (eval at create (C:\sec\AppData\Roaming\npm\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:21:81694), <anonymous>:9:1)
    at eval (eval at create (C:\sec\AppData\Roaming\npm\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:21:81694), <anonymous>:34:22)

I've tested under various conditions and the error occurs, until I remove the line with ngrok

const url = await ngrok.connect({ port: 8080 });

Have you some way to deal with ngrok and still use the vcc?

@kotekpsotek kotekpsotek changed the title VCC cannot transpile grok VCC cannot transpile ngrok Feb 24, 2025
@styfle styfle added bug Something isn't working help wanted Extra attention is needed labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants