sign-language-processing / pose

Library for viewing, augmenting, and handling .pose files
https://pose-format.readthedocs.io/en/latest/
MIT License
77 stars 23 forks source link

Unable to import pose-format js inside .mjs file #99

Open deepaktammali opened 2 months ago

deepaktammali commented 2 months ago

Hi, Thanks for the work on this library. I am facing the following error when importing pose-format in a .mjs file.

(node:33955) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use node --trace-warnings ... to show where the warning was created)

**/node_modules/.pnpm/pose-format@1.4.1/node_modules/pose-format/dist/index.js:1 import { Buffer } from "buffer"; ^^^^^^

SyntaxError: Cannot use import statement outside a module

AmitMY commented 2 months ago

You are correct, our build target is: https://github.com/sign-language-processing/pose/blob/master/src/js/pose_format/tsconfig.json#L10-L11

If you would like to create multiple targets, that is something that I would happily merge.