oclif / oclif

CLI for generating, building, and releasing oclif CLIs. Built by Salesforce.

Home Page:https://oclif.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oclif readme error - config.plugins.get is not a function

bmckeown-ascensus opened this issue Β· comments

Do you want to request a feature or report a bug?

Report a bug.

What is the current behavior?

  • Git clone https://github.com/oclif/hello-world
  • Upgrade oclif dependency to ^4.1.0
  • Run yarn run prepack or oclif readme directly
  • Receive error "Error: config.plugins.get is not a function"

Error stack:

TypeError: config.plugins.get is not a function
    at Readme.commandCode (/Users/my.user/Projects/hello-world/node_modules/oclif/lib/commands/readme.js:41:39)
    at Readme.renderCommand (/Users/my.user/Projects/hello-world/node_modules/oclif/lib/commands/readme.js:129:22)
    at /Users/my.user/Projects/hello-world/node_modules/oclif/lib/commands/readme.js:70:41
    at Array.map (<anonymous>)
    at Readme.commands (/Users/my.user/Projects/hello-world/node_modules/oclif/lib/commands/readme.js:70:25)
    at Readme.run (/Users/my.user/Projects/hello-world/node_modules/oclif/lib/commands/readme.js:176:133)
    at async Readme._run (/Users/my.user/Projects/hello-world/node_modules/oclif/node_modules/@oclif/core/lib/command.js:117:22)
    at async Config.runCommand (/Users/my.user/Projects/hello-world/node_modules/oclif/node_modules/@oclif/core/lib/config/config.js:314:25)
    at async run (/Users/my.user/Projects/hello-world/node_modules/oclif/node_modules/@oclif/core/lib/main.js:89:16)
    at async Module.execute (/Users/my.user/Projects/hello-world/node_modules/oclif/node_modules/@oclif/core/lib/main.js:154:5)

What is the expected behavior?

The oclif readme command runs without errors.

@bmckeown-ascensus I'm not seeing this following your reproduction steps - is this still an issue you're seeing?

I'm actually getting a different error now using these same steps, but earlier during the yarn process trying to update oclif to ^4.

➜  hello-world git:(main) yarn
yarn install v1.22.21
[1/5] πŸ”  Validating package.json...
[2/5] πŸ”  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] πŸ”—  Linking dependencies...
warning "oclif > yeoman-environment@3.15.1" has unmet peer dependency "mem-fs@^1.2.0 || ^2.0.0".
warning "oclif > yeoman-environment@3.15.1" has unmet peer dependency "mem-fs-editor@^8.1.2 || ^9.0.0".
warning Workspaces can only be enabled in private projects.
[5/5] πŸ”¨  Building fresh packages...
success Saved lockfile.
$ yarn build
yarn run v1.22.21
$ shx rm -rf dist && tsc -b
node_modules/@oclif/core/lib/cli-ux/styled/progress.d.ts:1:36 - error TS7016: Could not find a declaration file for module 'cli-progress'. '/Users/my.user/Projects/hello-world/node_modules/cli-progress/cli-progress.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/cli-progress` if it exists or add a new declaration (.d.ts) file containing `declare module 'cli-progress';`

1 import { Options, SingleBar } from 'cli-progress';
                                     ~~~~~~~~~~~~~~


Found 1 error.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.