prismarine-viewer
prismarine-viewer copied to clipboard
Broken JSPYBridge support
when using require("prismarine-viewer") i get this error:
require() of ES Module /home/silke/.pyenv/versions/3.11.6/lib/python3.11/site-packages/javascript/js/node_modules/@tweenjs/tween.js/dist/tween.cjs.js from /home/silke/.pyenv/versions/3.11.6/lib/python3.11/site-packages/javascript/js/node_modules/prismarine-viewer/viewer/lib/viewer.js not supported.\ntween.cjs.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.\nInstead rename tween.cjs.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /home/silke/.pyenv/versions/3.11.6/lib/python3.11/site-packages/javascript/js/node_modules/@tweenjs/tween.js/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).\n\n at Object.<anonymous> (/home/silke/.pyenv/versions/3.11.6/lib/python3.11/site-packages/javascript/js/node_modules/prismarine-viewer/viewer/lib/viewer.js:2:15)\n at Object.<anonymous> (/home/silke/.pyenv/versions/3.11.6/lib/python3.11/site-packages/javascript/js/node_modules/prismarine-viewer/viewer/index.js:2:11)\n at Object.<anonymous> (/home/silke/.pyenv/versions/3.11.6/lib/python3.11/site-packages/javascript/js/node_modules/prismarine-viewer/lib/mineflayer.js:2:23)\n at Object.<anonymous> (/home/silke/.pyenv/versions/3.11.6/lib/python3.11/site-packages/javascript/js/node_modules/prismarine-viewer/index.js:2:15)')
maybe this is a bug with jspybridge but idk
tested it and it workes fine in npm version 1.25.0 and below. 1.19 & 1.20 support broke it ig
What prismarine-viewer version?
What prismarine-viewer version?
so version 1.25.0 for the viewer works but anything above that fails. Not only on my pc everyone that uses lodestone also gets this error. i fixed it by setting the version back to 1.25.0 in the python import.
https://github.com/PrismarineJS/prismarine-viewer/pull/381 probably need to roll back this