We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the readme, you have given this example:
const { Client } = require('libquassel'); const net = require('net'); const socket = net.createConnection({ host: "localhost", port: 4242 }); const quassel = new Client((next) => next("user", "password")); quassel.on('network.init', (networkId) => { network = quassel.networks.get(networkId); // ... }); // ... quassel.connect(socket);
However, when you run this example using node foo.js, there is an error saying:
node foo.js
import './usertypes'; // register usertypes first ^^^^^^ SyntaxError: Cannot use import statement outside a module
If you change const { Client } = require('libquassel'); to const { Client } = require('libquassel/dist/libquassel');, the error is:
const { Client } = require('libquassel');
const { Client } = require('libquassel/dist/libquassel');
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.libquassel=t():e.libquassel=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=functi ReferenceError: window is not defined
If you add global.window = {}; to the beginning of the file, the script seems to run, but it closes after a tenth of a second.
global.window = {};
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the readme, you have given this example:
However, when you run this example using
node foo.js
, there is an error saying:If you change
const { Client } = require('libquassel');
toconst { Client } = require('libquassel/dist/libquassel');
, the error is:If you add
global.window = {};
to the beginning of the file, the script seems to run, but it closes after a tenth of a second.The text was updated successfully, but these errors were encountered: