pose-format icon indicating copy to clipboard operation
pose-format copied to clipboard

Unable to import pose-format js inside .mjs file

Open deepaktammali opened this issue 1 year ago • 1 comments
trafficstars

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/[email protected]/node_modules/pose-format/dist/index.js:1 import { Buffer } from "buffer"; ^^^^^^

SyntaxError: Cannot use import statement outside a module

deepaktammali avatar Aug 12 '24 19:08 deepaktammali

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.

AmitMY avatar Aug 13 '24 16:08 AmitMY