D
Deno
G
Deno
β’
16mo ago
β’
2 replies
groendahl
https://github.com/apache/pulsar-client-node - does it work in Deno?
I tried to include it as follows
:
import pulsarNode from "npm:pulsar-client";
console.log(pulsarNode);
import pulsarNode from "npm:pulsar-client";
console.log(pulsarNode);
I get this error
:
error
: Uncaught
(in promise
) Error
: Cannot find module
'
/Users
/dkJoGrPe
/projects
/lego
/lmv
-canteen
/node
_modules
/
.deno
/pulsar
-client
@1
.12
.0
/node
_modules
/pulsar
-client
/lib
/binding
/pulsar
.node
'
info
: Trying to execute an npm package using Node
-API addons
,
these packages require local
node_modules
node_modules
directory to be present
.
hint
: Add
"nodeModulesDir
"
:
"auto
" option to
deno.json
deno.json
, and then run
deno install
-
-allow
-scripts
=
n
p
m
:
<package
>
-
-entrypoint
<script
> to setup node
_modules
`directory
.
I have a local node
_modules folder with the library already using option nodeModulesDir
=
"auto
" in deno
.json
The library has this note
:
This library works only in Node
.js 12
.3 or later because it uses
:
The node
-addon
-api module to wrap the C
+
+ library
.
The Mozilla CA file
, which is provided by Node
.js v12
.3
.0 and subsequent versions
.
Does it work in Deno
?
Deno
Join
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
How does importing `node:https` work?
A
abi / help
3y ago
Does the deno-astro-adapter will be updated to use astro 4? https://github.com/denoland/deno-astro-a
F
fro.profesional / help
3y ago
HTTPS w/ client certificate β works in Node.js, not in Deno
A
abi / help
3y ago
what rpc version is https://github.com/deno-libs/rpc?
D
datmetal1 / help
2y ago