oclif/config

Cannot read property 'filter' of undefined

Closed this issue · 0 comments

I got the error from the title.
It is in lib/config.js:90:83

Introduced in the following commit
a23329a

if (!pjson.oclif) pjson.oclif = {schema: 1}
await this.loadPlugins(userPJSONPath, 'user', pjson.oclif.plugins.filter((p: any) => p.type === 'user'))

you set pjson.oclif to { schema: 1 }
and then tries to call filter on its property plugins which is undefined