Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28393] CLI: Building with -C option will fail with "ENOENT: no such file or directory, open" error

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2021-04-07T15:32:43.000+0000
Affected Version/sRelease 10.0.0
Fix Version/sRelease 10.0.0
ComponentsCLI
Labelsregression
ReporterEwan Harris
AssigneeEwan Harris
Created2021-03-15T12:41:22.000+0000
Updated2021-04-07T15:32:43.000+0000

Description

Description

*This is blocking CI builds on Jenkins, we should revert the node-ios-device update* When building with -C the build will error with an error like below, this is because node-pre-gyp is parsing our -C flag and assuming it's meant for itself and changing the directory which is then causing the error. I think node-pre-gyp-init needs to maybe try and force node-pre-gyp to not do this.
 Error: ENOENT: no such file or directory, open 'foooo/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/10.0.0.v20210312130708/node_modules/node-ios-device/package.json'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at Run.parseOpts [as parseArgv] (/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/10.0.0.v20210312130708/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:176:37)
    at new Run (/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/10.0.0.v20210312130708/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:85:8)
    at exports.find (/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/10.0.0.v20210312130708/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js:21:16)
    at Immediate.<anonymous> (/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/10.0.0.v20210312130708/node_modules/node-pre-gyp-init/index.js:21:21)
    at processImmediate (internal/timers.js:461:21) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'foooo/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/10.0.0.v20210312130708/node_modules/node-ios-device/package.json'
}

Steps to reproduce

1. With a 10.0.0 build pass in the -C option when building to ios

Actual

Above error

Expected

No error

Comments

  1. Ewan Harris 2021-03-15

    10_0_X revert: https://github.com/appcelerator/titanium_mobile/pull/12577 master revert : https://github.com/appcelerator/titanium_mobile/pull/12578
  2. Ewan Harris 2021-03-15

    node-pre-gyp-init PR to clear process.argv before calling @mapbox/node-pre-gyp https://github.com/cb1kenobi/node-pre-gyp-init/pull/3
  3. Ewan Harris 2021-03-15

    master PR to update node-pre-gyp-init dependency: https://github.com/appcelerator/titanium_mobile/pull/12579
  4. Samir Mohammed 2021-04-07

    FR Passed error no longer seen when running appc run -p ios -C <ios uuid> Tested using SDK Version 10.1.0.v20210407072202 and 10.0.0.v20210407072525.

JSON Source