while following the build instructions. when running make the build errors with
npm run start-example-node
> imgui-js@1.0.0 start-example-node /mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js
> node example/index.js
(node:13175) UnhandledPromiseRejectionWarning: ReferenceError: __dirname is not defined
at ModuleNamespace.<anonymous> (file:///mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/bind-imgui.js:8:1038)
at Promise (file:///mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/imgui.js:17:29)
at new Promise (<anonymous>)
at Object.<anonymous> (file:///mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/imgui.js:16:20)
at Generator.next (<anonymous>)
at file:///mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/imgui.js:9:75
at new Promise (<anonymous>)
at __awaiter (file:///mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/imgui.js:5:16)
at Object.default_1 [as default] (file:///mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/imgui.js:15:16)
at ModuleNamespace.<anonymous> (file:///mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/example/main.js:22:32)
(node:13175) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:13175) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
__dirname can be replaced by hand with process.cwd() which then reveals another error:
npm run start-example-node
> imgui-js@1.0.0 start-example-node /mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js
> node example/index.js
{ ENOENT: no such file or directory, open '/mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/main.js'
Instantiating /mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/main.js
Loading ./main
Error: ENOENT: no such file or directory, open '/mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/main.js'
originalErr:
{ Error: ENOENT: no such file or directory, open '/mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/main.js'
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/mnt/c/Users/ehb56/OneDrive/Documents/GitHub/Timeline/imgui-js/main.js' } }```
while following the build instructions. when running
make
the build errors with__dirname
can be replaced by hand withprocess.cwd()
which then reveals another error: