Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23632] recent update to titanium_mobile breaks API change script

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2016-08-03T21:01:18.000+0000
Affected Version/sRelease 5.4.0
Fix Version/sn/a
ComponentsRelease
Labelsn/a
Reporter(deactived) Brian Immel
AssigneeChris Barber
Created2016-07-13T17:08:21.000+0000
Updated2018-07-13T16:26:00.000+0000

Description

Changes made in https://github.com/appcelerator/titanium_mobile/commit/43f2dc8e17c184a7b5b0e50792ab9b0f3d9dcccd#diff-297c1fc19b7b017b4a6d8856e9184fcd breaks my script that generates API changes for the SDK release note. Error message:
/Users/bimmel/Documents/Repo/titanium_mobile/node_modules/ejs/lib/ejs.js:528
        this.source += '    ; __filename = "' + this.opts.filename.replace(/\\/g,  '/') + '"\n';
                                                                   ^

TypeError: this.opts.filename.replace is not a function
    at Object.Template.generateSource (/Users/bimmel/Documents/Repo/titanium_mobile/node_modules/ejs/lib/ejs.js:528:68)
    at Object.Template.compile (/Users/bimmel/Documents/Repo/titanium_mobile/node_modules/ejs/lib/ejs.js:444:12)
    at Object.compile (/Users/bimmel/Documents/Repo/titanium_mobile/node_modules/ejs/lib/ejs.js:289:16)
    at handleCache (/Users/bimmel/Documents/Repo/titanium_mobile/node_modules/ejs/lib/ejs.js:148:16)
    at Object.exports.render (/Users/bimmel/Documents/Repo/titanium_mobile/node_modules/ejs/lib/ejs.js:316:10)
    at /Users/bimmel/Documents/Repo/titanium_mobile/apidoc/docgen.js:913:17
    at Array.forEach (native)
    at Object.<anonymous> (/Users/bimmel/Documents/Repo/titanium_mobile/apidoc/docgen.js:848:9)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)

Comments

  1. Chris Barber 2016-08-03

    I do not have sufficient information in this ticket to reproduce the error. I don't know what version of Node.js you're using. I don't know what command you ran, so I assume node docgen.js from the apidoc directory. I ran docgen.js using Node.js 4.4.7 for both master and 5_4_X branches and it ran just fine. Perhaps the apidoc directory should have its own package.json so it can manage its own dependencies and not rely on those in the SDK.
  2. (deactived) Brian Immel 2016-08-03

    Please disregard. I found the problem and fixed my script.

JSON Source