Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19290] CLI: ti build for modules errors with Cannot find module 'archiver/lib/archiver/core'

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-09-14T05:44:31.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sRelease 5.0.0
ComponentsCLI
Labelsqe-5.0.0, regression
ReporterEwan Harris
AssigneeFeon Sua Xin Miao
Created2015-07-30T17:02:13.000+0000
Updated2017-03-17T21:33:51.000+0000

Description

Description

When attempting to build Titanium modules with appc ti build or ti build the build errors out with the below
/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:195
        throw e;
              ^
Error: Cannot find module 'archiver/lib/archiver/core'
    at Module._resolveFilename (module.js:336:15)
    at Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/iphone/cli/commands/_buildModule.js:17:17)
    at Module._compile (module.js:460:26)
    at Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
---------------------------------------------
    at exports.execFile (child_process.js:821:9)
    at exports.exec (child_process.js:649:18)
    at /usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/environ.js:267:3
    at /usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:251:17
    at /usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:154:25
    at /usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:248:21
    at /usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:612:34
    at /usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/environ.js:234:7
---------------------------------------------
    at exports.execFile (child_process.js:821:9)
    at exports.exec (child_process.js:649:18)
    at /usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/environ.js:227:6
    at /usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:607:21
    at /usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:246:17
    at iterate (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:146:13)
    at async.eachSeries (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:162:9)
    at _asyncMap (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:245:13)
---------------------------------------------
    at Object.run (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/lib/subprocess.js:59:8)
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/certs.js:122:24
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:683:13
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:234:13
    at _arrayEach (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:85:13)
    at _each (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:76:13)
    at async.forEachOf.async.eachOf (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:233:9)
    at _parallel (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:682:9)
---------------------------------------------
    at Object.run (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/lib/subprocess.js:59:8)
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/certs.js:72:21
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/env.js:98:4
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:691:13
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:52:16
    at done (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:243:21)
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:44:16
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:688:17
---------------------------------------------
    at Object.run (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/lib/subprocess.js:59:8)
    at find (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/lib/subprocess.js:96:14)
    at q.process (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/node_modules/async/lib/async.js:806:21)
    at processImmediate (timers.js:367:17)
---------------------------------------------
    at async.setImmediate (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/node_modules/async/lib/async.js:107:15)
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/node_modules/async/lib/async.js:765:21
    at _each (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/node_modules/async/lib/async.js:46:13)
    at _insert (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/node_modules/async/lib/async.js:750:11)
    at q.push (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/node_modules/async/lib/async.js:779:15)
    at Object.findExecutable (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/node-appc/lib/subprocess.js:113:8)
    at async.parallel.security (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/env.js:64:21)
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:683:13
---------------------------------------------
    at magik (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/utilities.js:40:13)
    at Object.detect (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/env.js:49:9)
    at getCerts (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/certs.js:58:8)
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/certs.js:185:3
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/utilities.js:55:9
    at process._tickCallback (node.js:355:11)
---------------------------------------------
    at magik (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/utilities.js:40:13)
    at Object.detect (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/certs.js:48:9)
    at certificates (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/index.js:76:11)
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:683:13
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:234:13
    at _arrayEach (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:85:13)
    at _each (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:76:13)
    at async.forEachOf.async.eachOf (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:233:9)
---------------------------------------------
    at magik (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/lib/utilities.js:40:13)
    at Object.detect (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/ioslib/index.js:44:9)
    at iOSBuilder.<anonymous> (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/iphone/cli/commands/_build.js:285:10)
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/titanium-sdk/lib/titanium.js:99:5
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:683:13
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:234:13
    at _arrayEach (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:85:13)
    at _each (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.2.0.v20150729134419/node_modules/async/lib/async.js:76:13)
---------------------------------------------
    at Object.run (/usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:59:8)
    at find (/usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:96:14)
    at q.process (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:806:21)
    at processImmediate (timers.js:367:17)
---------------------------------------------
    at async.setImmediate (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:107:15)
    at /usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:765:21
    at _each (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:46:13)
    at _insert (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:750:11)
    at q.push (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:779:15)
    at Object.findExecutable (/usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:113:8)
    at resolveNode (/usr/local/lib/node_modules/titanium/lib/titanium.js:97:34)
    at /usr/local/lib/node_modules/titanium/lib/titanium.js:74:5
I believe this is because of the updates archiver module in the 4.2.0 SDK. The build process works fine with 4.1.0.GA

Steps to reproduce

1. Create a module with appc new or ti create 2. cd into either the android, iphone or mobileweb folder 3. Build the module with appc ti build -p <platform you chose or ti build -p <platform you chose

Actual result

The build will error out with Cannot find module 'archiver/lib/archiver/core'

Expected result

The build should not error out

Comments

  1. Feon Sua Xin Miao 2015-09-13

    Master: https://github.com/appcelerator/titanium_mobile/pull/7175 5_0_X: https://github.com/appcelerator/titanium_mobile/pull/7176
  2. Chee Kiat Ng 2015-09-14

    FT failed. Left comments in PR.
  3. Chee Kiat Ng 2015-09-14

    CR and FT passed for after new commits. PRs merged.
  4. Lee Morris 2017-03-17

    Closing ticket as fixed.

JSON Source