Error: Can't walk dependency graph: Cannot find module 'tslib' from
RichardAtCT opened this issue · 2 comments
Hello! I am trying to use the npm package @1inch/limit-order-protocol-utils
Simply doing:
from js2py import require
utils = require('@1inch/limit-order-protocol-utils')
Is throwing the following error:
Error: Can't walk dependency graph: Cannot find module 'tslib' from '/private/var/folders/g6/y6zll2v50q93m9wdksdqpn9c0000gn/T/tmpadyi6uqn/node_modules/@1inch/limit-order-protocol-utils/index.js' required by /private/var/folders/g6/y6zll2v50q93m9wdksdqpn9c0000gn/T/tmpadyi6uqn/node_modules/@1inch/limit-order-protocol-utils/index.js
I've tried manually installing the mentioned packaged but no luck! Any suggestions?
It's asking for tslib (undefined dependency?). Loading it in first resolves that issue
import js2py
js2py.require(tslib)
utils = js2py.require('@1inch/limit-order-protocol-utils')
but yields an unexpectedTokenError in pyjsparser.
Okay I have now loaded 'tslib' and installed numpy but getting the following error - any suggestions?
File "/Users/.../venv/lib/python3.9/site-packages/js2py/node_import.py", line 107, in _get_and_translate_npm_module
assert subprocess.call(
AssertionError: Error when converting module to the js bundle