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
Describe the bug Failed to load zeromq.js addon.node: ReferenceError: __dirname is not defined
Reproducing I create a vue project and use typescript. It is a pure project created by the command npm create vue@latest and then I install the zeromq amd use it like this:
code :
<script setup lang="ts">
import TheWelcome from '../components/TheWelcome.vue'
import * as zmq from 'zeromq'
import { onMounted, watch, ref, reactive, onUnmounted } from 'vue'
onMounted(() => {
async () => {
let socket = new zmq.Subscriber()
socket.connect('tcp://127.0.0.1:5556')
socket.subscribe('datarecv')
console.log('Subscriber connected to port 5556')
for await (const [topic, msg] of socket) {
console.log('received a message related to:', topic, 'containing message:', msg)
}
}
})
when I open the browser ,this comes out:
Failed to load zeromq.js addon.node: ReferenceError: __dirname is not defined
Tested on
OS: [Windows 10]
The text was updated successfully, but these errors were encountered:
Describe the bug Failed to load zeromq.js addon.node: ReferenceError: __dirname is not defined
Reproducing I create a vue project and use typescript. It is a pure project created by the command
npm create vue@latest
and then I install the zeromq amd use it like this:code :
when I open the browser ,this comes out:
Failed to load zeromq.js addon.node: ReferenceError: __dirname is not defined
Tested on
The text was updated successfully, but these errors were encountered: