Comments (12)
Hi,
Please give me:
- the version of terminal-kit you are running
- the version of node.js you are running
- the OS and terminal you are using
Note that the last version of Terminal-kit needs at least Node v4.
from terminal-kit.
Hi @cronvel
I'm using terminal kit on node v5.3 - opensuse leap gnome , terminal-kit 0.21.8
.
The parent terminal is tty.
It's working fine in node environment, but not working when i require it via Meteor's Npm.require.
I' m guessing it's because of Meteor JS engine (missing prototype when require core module events
)
from terminal-kit.
Can you confirm that, by running in meteor the code:
if (Meteor.isServer) {
Meteor.startup(function () {
console.log( 'Node: ' + process.version ) ;
console.log( 'Versions: ' , process.versions ) ;
});
}
I just downloaded Meteor (I never tried it until now), and while I have Node v4.2.2 installed on my system, Meteor seems to use Node v0.10.40.
Here is what I get:
I20160104-10:28:50.446(1)? Node: v0.10.40
I20160104-10:28:50.447(1)? Versions: { http_parser: '1.0',
I20160104-10:28:50.447(1)? node: '0.10.40',
I20160104-10:28:50.448(1)? v8: '3.14.5.9',
I20160104-10:28:50.448(1)? ares: '1.9.0-DEV',
I20160104-10:28:50.448(1)? uv: '0.10.36',
I20160104-10:28:50.448(1)? zlib: '1.2.8',
I20160104-10:28:50.448(1)? modules: '11',
I20160104-10:28:50.449(1)? openssl: '1.0.1p' }
By the way, the same in plain Node:
Node: v4.2.2
Versions: { http_parser: '2.5.0',
node: '4.2.2',
v8: '4.5.103.35',
uv: '1.7.5',
zlib: '1.2.8',
ares: '1.10.1-DEV',
icu: '56.1',
modules: '46',
openssl: '1.0.2d' }
Of course, I'm totally new to meteor, so I may have done something bad somewhere.
It looks like meteor download and run its own instance of Mongodb, what about Node? Does it ship its own Node.js? Does it support the ES6 feature included in Node v4?
Also, events.prototype
should exist since Node/io-js v1 if I remember well (before that, one should use events.EventEmitter.prototype
instead).
from terminal-kit.
Here's my output:
I20160104-16:51:22.788(7)? Node: v0.10.40
I20160104-16:51:22.789(7)? Versions: { http_parser: '1.0',
I20160104-16:51:22.789(7)? node: '0.10.40',
I20160104-16:51:22.790(7)? v8: '3.14.5.9',
I20160104-16:51:22.790(7)? ares: '1.9.0-DEV',
I20160104-16:51:22.790(7)? uv: '0.10.36',
I20160104-16:51:22.790(7)? zlib: '1.2.8',
I20160104-16:51:22.790(7)? modules: '11',
I20160104-16:51:22.790(7)? openssl: '1.0.1p' }
Here's what require("events) look like:
I20160104-16:51:22.827(7)? { usingDomains: false,
I20160104-16:51:22.827(7)? EventEmitter: { [Function: EventEmitter] listenerCount: [Function] } }
It's seem like meteorJS ship with its own node version , which cause the issue.
ES6 can be added with ecmascript package , but that doesn't help either.
Do you think this 'll be a simple patch ( check prototype if exist?), or it'll take a lot of rework to support?
I don't think meteor can use external nodejs version :(
from terminal-kit.
Related issue on meteor : meteor/meteor#5124
from terminal-kit.
If the core event
module is the only failing dependency, I can patch it. Stay tuned ;)
from terminal-kit.
👍
from terminal-kit.
What exactly do you want to achieve with Terminal-kit?
I managed to get basic features to work as of [email protected], colors and style are working as expected now.
However, Meteor interfere with the TTY, and as a result Terminal-kit cannot grab inputs.
If you just want colorful log, that's ok.
BTW I guess you don't want to create an interactive terminal application.
from terminal-kit.
I'm writing an solution to allow meteor using external build instead of relying on isobuild.
I'm using terminal-kit to serve as info logger & replacement of charm in progressor.
I just stumble on the issue on accident when testing the server build.
Thanks you for fast response & amazing support 👍
Btw IMO terminal kit come with many bloat feature(like progress bar).
I think you should consider split it up to core and utility packages
Cheers.
from terminal-kit.
Thanks for your feedback. If you have trouble, let me know! ;)
from terminal-kit.
I have good news for you!
I have added a new built-in terminal instance that might interest you.
Instead of using: Npm.require( "terminal-kit" ).terminal
, try using Npm.require( "terminal-kit" ).realTerminal
.
Using this, you gain access to the real TTY and totally hijack all the meteor stuffs that get in the way when terminal-kit try to read/write from STDIN and STDOUT.
This terminal instance also escape from pipe.
Using that, you can even use all terminal-kit interactive features, if you need.
BTW, meteor will still occasionally write things down to the terminal.
from terminal-kit.
Hey @cronvel , i'm glad you was able to patch it . Great update!
I'll try it as soon as i can.
Sorry for the late reply, i'm too busy these days.
Cheers.
from terminal-kit.
Related Issues (20)
- terminalkit.TextBox is not a constructor HOT 3
- document: InlineInputField only widthPercent breaks input
- Redraw window every "frame" HOT 1
- Word/Line wrap ERROR when x,y,width or height of TextBox are non integers
- Unable to draw the correct image in vscode dark-mode terminal!
- Can't run after packed with pkg HOT 3
- Cannot input after using term.inputField() HOT 4
- Issue: Terminal stuck in while-loop when initating another terminal with stdin/stdout
- Form control event and validation
- form render issue - hide/show control
- Erase Everything - How?
- Possible EventEmitter memory leak
- Multiple Documents in Same Terminal Screen
- support for fonts
- term.table does not work in Azure pipeline HOT 6
- term.table does not work in Azure pipeline HOT 1
- Unable to bundle code with dependencies HOT 5
- inputField Inline support? HOT 1
- Documentation request: cannot chain .inputField
- Unable to add left padding to singleLineMenu?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminal-kit.