You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Hey @dachev, any update on this? I'm having the same issue:
When using the library in typescript with: import cld from 'cld'
I get:
in my IDE:
in my terminal when running the project:
Error: Cannot find module './build/Release/cld'
Require stack:
- ***********************************************/node_modules/cld/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Module._load (node:internal/modules/cjs/loader:841:27)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (********************************************************/node_modules/cld/index.js:2:14)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'***********************************************/node_modules/cld/index.js'
]
}
Might be related to #67
But I am having some issues using cld in a Node project using
esbuild
andTypescript
.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?These are the files there.
It only happens when compiling using
esbuild
. Doesn't happen withts-node
for instance.This is how I run it
This is how I import it
The text was updated successfully, but these errors were encountered: