twilio-labs / plugin-token

Twilio CLI plugin for generating access tokens for Twilio Chat, Video, etc.
MIT License
5 stars 14 forks source link

oclif readme command doesn't work #47

Open micaswyers opened 2 years ago

micaswyers commented 2 years ago

When trying to auto-generate the README using oclif-dev, I ran into an issue: ..

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:1070:16)
    at Module._compile (internal/modules/cjs/loader.js:1120:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1042:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/Users/mswyers/work/plugin-token/node_modules/@oclif/core/lib/index.js:6:19)
    at Module._compile (internal/modules/cjs/loader.js:1156:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
module: @oclif/config@1.18.2
task: toCached
plugin: @twilio-labs/plugin-token
root: /Users/<me>/work/plugin-token
See more details with DEBUG=*
(node:83873) SyntaxError Plugin: @twilio-labs/plugin-token: Unexpected token '.'
module: @oclif/config@1.18.2
task: toCached
plugin: @twilio-labs/plugin-token
root: /Users/<me>/work/plugin-token
See more details with DEBUG=*
/Users/<me>/work/plugin-token/node_modules/@twilio/cli-core/node_modules/@oclif/core/lib/command.js:51
            delete this.globalFlags?.json;
                                    ^
                                    ^

Because it is no longer supported, I have removed the oclif-dev dependency from package.json. In SCRIPTS, you should be able to generate the readme with:

oclif readme

(and oclif manifest in the prepack step)

However, it looks like there's a bug in the @oclif/core module.