You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pythonmonkey isn't able to follow imports in js when require("..") is written.
Standalone code to reproduce the issue
import pythonmonkey
import os
pythonmonkey.globalThis["process"] = {"env": os.environ}
pythonmonkey.require('@babel/generator')
Relevant log output or backtrace
Traceback (most recent call last):
File "/Users/n/fff/main.py", line 5, in<module>
pythonmonkey.require('@babel/generator')
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/Users/n/fff/.venv/lib/python3.13/site-packages/pythonmonkey/require.py", line 431, in require
return createRequire(filename)(moduleIdentifier)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
pythonmonkey.SpiderMonkeyError: Error in file /Users/n/fff/.venv/lib/python3.13/site-packages/pythonmonkey/node_modules/ctx-module/ctx-module.js, on line 238, column 21:
Error: module not found -- require('') from /Users/n/fff/node_modules/@babel/types/lib/builders/validateNode.js
Additional info if applicable
The content of `/Users/n/fff/node_modules/@babel/types/lib/builders/validateNode.js`:
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = validateNode;
var _validate = require("../validators/validate");
var _ = require("..");<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ERROR HAPPENING HERE
functionvalidateNode(node) {
const keys = _.BUILDER_KEYS[node.type];for (const key of keys) {
(0, _validate.default)(node, key, node[key]);
}
return node;
}
//# sourceMappingURL=validateNode.js.map
What branch of PythonMonkey were you developing on? (If applicable)
Activity