Closed romainreignier closed 21 hours ago
I have tested the same kind of code in the browser, based on your example and it works (package.json and yarn install). So it might be an incompatibility with deno.
Hi romainreignier Thanks for the report !
So this looks like an issue with how Typescript transpiles into Javascript, not appending .js
to the file extension in the js source in /dist
.
Browsers seem to handle this without the extension, looks like deno doesn't.
It looks like including the .js
in typescript source shouldn't effect the compilation other than fixing imports for deno.
I will test this out and open a PR to get this to work in Deno as well.
Deno looks like it might be a better bet to getting the Typescript bindings working on the server than Node.js
.
Support for Deno has been added in https://github.com/eclipse-zenoh/zenoh-ts/pull/22.
I wanted to try this new zenoh-ts and I have written a simple deno application but when I run
deno run main.ts
, I have this error:I am NOT a typescript developer so it might be an issue on my side or a compatibility issue with the NPM package format expected by deno.
Steps to reproduce
deno init z_sub_ts
cd z_sub_ts
add a
.npmrc
file with this content:main.ts
with the example (from here):deno run main.ts
As a side note, the version
0.0.8
mentioned in the README is not present in the Github NPM repo, only the version0.0.9
.