Skip to content

Conversation

Eric-Tyrrell22
Copy link

Fixes

twilio-cli throws an error when running the post-install script if the node version doesn't support optional chaining. Since it's already installing a full node runtime, it might as well use it for this.

root@eric-MS-7C02:~# apt-get upgrade -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
...
Setting up twilio (5.14.0-1) ...
/usr/lib/twilio-cli/node_modules/@oclif/core/lib/command.js:41
            delete this.globalFlags?.json;
                                    ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/lib/twilio-cli/node_modules/@oclif/core/lib/index.js:6:19)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
dpkg: error processing package twilio (--configure):
 installed twilio package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 twilio
E: Sub-process /usr/bin/dpkg returned an error code (1)

Made the edit to the post install script locally and it worked. Unsure of how to test the github action itself, so hopefully someone can help me with that.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant