[DAEMON-286] Incompatible Node environment in plugin modules
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2019-10-30T16:34:36.000+0000 |
Affected Version/s | Appc Daemon 3.0.0 |
Fix Version/s | n/a |
Components | appcd-plugin |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Jan Vennemann |
Created | 2019-09-30T15:59:37.000+0000 |
Updated | 2019-10-30T16:34:36.000+0000 |
Description
Plugins extend the default Node module definition to override the require behavior and inject a few globals. The provided globals include
console
, which is not fully compatible with the default Node behavior.
- require
is missing require.paths
and require.main
.
- The global console
object in Node is special in that it is is bound to Node's IO streams, which are [TTY](https://nodejs.org/api/tty.html#tty_tty) based streams with additional properties.
Other Node third-party modules that rely on these particular environment details do not work in plugins.
PR: https://github.com/appcelerator/appc-daemon/pull/435 The
console
issues seem to be resolved with the recent snooplog update.