lv_img_conv
lv_img_conv copied to clipboard
Error: swc compiler requires either @swc/core or @swc/wasm to be installed...
When trying to install this globally, I encountered the following error:
$ lv_img_conv
/home/luda/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/transpilers/swc.ts:45
throw new Error(
^
Error: swc compiler requires either @swc/core or @swc/wasm to be installed as a dependency. See https://typestrong.org/ts-node/docs/transpilers
...
After researching the issue, I could solve it by installing the devDependencies for ts-node.
$ cd lv_img_conv/
$ sudo npm install ts-node --save-dev
$ lv_img_conv
Options:
--help Show help [boolean]
--version Show version number [boolean]
--output-file, -o output file path (for single-image conversion) [string]
...
Consider this closed. I'm leaving this here in case it helps others as well
Thank you for this, just helped me!
I'm on windows and had similar issue. I think just updating the package worked...
npm remove @swc/core npm remove @swc/helpers npm install @swc/core --save-dev npm install @swc/helpers --save-dev
And what's nice is I can simply run ts-node lv_img_conf.js on windows, same as the "linux" instructions.