Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

353
Visualizações
Unexpected token with mineflyer on python via a bridge in a docker continer

I am creating a ubuntu:20.04 docker container and installing python 3.9 and node 16.x along with npm. I am then running a js library with a javascript to python bridge. The library is mineflyer and I am using it to create a discord.py bot. Running the files outside of a docker continer works perfectly fine(windows 10) but when I run the file inside one, it give me a error. ERROR:

Traceback (most recent call last):
  File "/code/bot.py", line 7, in <module>
    from mcbot import cheekline
  File "/code/mcbot.py", line 2, in <module>
[JSE] /usr/local/lib/python3.9/dist-packages/javascript/js/bridge.js:14
[JSE] const debug = process.env.DEBUG?.includes('jspybridge') ? console.debug : () => { }
[JSE]                                 ^
[JSE] SyntaxError: Unexpected token .
[JSE]     at Module._compile (internal/modules/cjs/loader.js:723:23)
[JSE]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
[JSE]     at Module.load (internal/modules/cjs/loader.js:653:32)
[JSE]     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
[JSE]     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
[JSE]     at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
[JSE]     at startup (internal/bootstrap/node.js:283:19)
[JSE]     at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

** The Node process has crashed. Please restart the runtime to use JS APIs. **

Timed out get 0 needsNodePatches None
    from javascript import require, On, Once, AsyncTask, once, off
  File "/usr/local/lib/python3.9/dist-packages/javascript/__init__.py", line 20, in <module>
    init()
  File "/usr/local/lib/python3.9/dist-packages/javascript/__init__.py", line 16, in init
    if config.global_jsi.needsNodePatches():
  File "/usr/local/lib/python3.9/dist-packages/javascript/proxy.py", line 225, in __getattr__
    methodType, val = self._exe.getProp(self._pffid, attr)
  File "/usr/local/lib/python3.9/dist-packages/javascript/proxy.py", line 145, in getProp
    resp = self.ipc("get", ffid, method)
  File "/usr/local/lib/python3.9/dist-packages/javascript/proxy.py", line 38, in ipc
    raise Exception(f"Timed out accessing '{attr}'")
Exception: Timed out accessing 'needsNodePatches'
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

i got same problem, I just went to bridge.js and removed stuff, that was blocking it. Two questionmarks and something other in line 273. It solved first half of the problem. but still getting error from python executor.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda