starlanestudios / node-tmux Goto Github PK
View Code? Open in Web Editor NEWLightweight NodeJS tmux wrapper for manging tmux sessions
License: ISC License
Lightweight NodeJS tmux wrapper for manging tmux sessions
License: ISC License
I installed the module using npm install --save node-tmux
in my
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
and when I tried to import the module:
import {tmux} from 'node-tmux';
^^^^
SyntaxError: The requested module 'node-tmux' does not provide an export named 'tmux'
at ModuleJob._instantiate (internal/modules/esm/module_job.js:92:21)
at async ModuleJob.run (internal/modules/esm/module_job.js:107:20)
at async Loader.import (internal/modules/esm/loader.js:179:24)
Then I tried
import * as tmux from 'node-tmux';
console.log(tmux)
tmux().then(tm => { ...
Which resulted to:
[Module] {
default: { Tmux: [Function: Tmux], tmux: [Function: tmux] }
}
file:///home/test/mcn/index.js:6
tmux().then(tm => {
^
TypeError: tmux is not a function
Even tho i tried using
tmux.default.tmux().then(tm => { ...
I still couldn't get an instance
I've been trying to implement this in my program for quite some time now, with no success.
This lib being made of all promises, I can't ever use the Tmux class in the then() block, as it's still pending.
How do I use the functions ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.