Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

349
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!