Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

351
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda