{ "id": "162892", "key": "DAEMON-34", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12519", "key": "DAEMON", "name": "Appcelerator Daemon" }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-19T15:47:34.000+0000", "created": "2016-08-30T23:32:31.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-06-19T15:47:34.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "15051", "name": "androidlib", "description": "Library for Android related functions" } ], "description": "*Details:* {{TypeError: _nodeAppc2.default.detect.Watcher is not a function}} is thrown if you call {{androidlib.watch()}}.\r\n\r\n*Note:* This occurs on both Windows and Mac.\r\n\r\n*Steps to reproduce:*\r\n# Make sure you are using Node 4.X.X\r\n# Clone and run {{npm install}} on https://github.com/appcelerator/androidlib/tree/v2; make sure it's v2 branch\r\n# Symlink to the above built androidlib v2\r\n# Run this Node script:\r\n{code}\r\n'use strict';\r\n\r\n// NOTE: currently, symlinked node_modules/androidlib folder to a built local copy of https://github.com/appcelerator/androidlib/tree/v2\r\nconst androidlib = require('androidlib').androidlib;\r\n\r\nandroidlib\r\n .watch()\r\n .on('results', results => {\r\n console.log(JSON.stringify(results, null, 4));\r\n })\r\n .on('error', err => {\r\n console.log(err.stack);\r\n });\r\n{code}\r\n\r\n*Actual:* A TypeError is thrown:\r\n{code}\r\n~/github/libautomator$ node test.js\r\n\r\n/Users/wilson_san/github/androidlib/dist/index.js:84\r\n\tconst handle = new appc.detect.Watcher;\r\n ^\r\nTypeError: _nodeAppc2.default.detect.Watcher is not a function\r\n at Object.watch (/Users/wilson_san/github/androidlib/dist/index.js:84:17)\r\n at Object. (/Users/wilson_san/github/libautomator/test.js:7:6)\r\n at Module._compile (module.js:409:26)\r\n at Object.Module._extensions..js (module.js:416:10)\r\n at Module.load (module.js:343:32)\r\n at Function.Module._load (module.js:300:12)\r\n at Function.Module.runMain (module.js:441:10)\r\n at startup (node.js:139:18)\r\n at node.js:968:3\r\n{code}\r\n\r\n*Expected:* No TypeError should be thrown.", "attachment": [], "flagged": false, "summary": "androidlib v2- \"TypeError: _nodeAppc2.default.detect.Watcher is not a function\" is thrown if you call androidlib.watch()", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "androidlib v2: 2.0.0\r\nOS: Mac OS X (10.11.6), Windows 10", "comment": { "comments": [ { "id": "422234", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Watcher logic has been moved out of node-appc and androidlib and into appcd-fswatcher.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-06-19T15:47:34.000+0000", "updated": "2017-06-19T15:47:34.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }