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
oroclif 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.