Open seivan opened 1 year ago
@seivan what directory did you ls
in your last message? Was it ./node_modules/cld/build/Release
?
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 https://github.com/dachev/node-cld/issues/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