-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Might be related to #67
But I am having some issues using cld in a Node project using esbuild and Typescript.
$ yarn run make
✘ [ERROR] Could not resolve "./build/Release/cld"
.yarn/unplugged/cld-npm-2.9.0-8b7667576b/node_modules/cld/index.js:2:21:
2 │ const cld2 = require('./build/Release/cld');
Not sure if the path is being used relative to my cwd (since that's wrong) or if something is missing in the <modules_folder>/build/Release folder?
$ ls
cld-c.a cld.node obj.target
These are the files there.
It only happens when compiling using esbuild. Doesn't happen with ts-node for instance.
This is how I run it
esbuild src/main.ts --bundle --sourcemap --platform=node --target=ES2022 --outfile=build/dist/main.js
This is how I import it
import { detect } from "cld"GA1, jokroese and fredericbarthelet
Metadata
Metadata
Assignees
Labels
No labels