guigrpa / oao

A Yarn-based, opinionated monorepo management tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

INVALID_DIR_NAME

richburdon opened this issue · comments

Ran oao for the first time.

oao status
Error: INVALID_DIR_NAME
    at validatePkgName (/Users/burdon/.config/yarn/global/node_modules/oao/lib/utils/readSpecs.js:88:11)
    at readOneSpec (/Users/burdon/.config/yarn/global/node_modules/oao/lib/utils/readSpecs.js:75:3)
    at /Users/burdon/.config/yarn/global/node_modules/oao/lib/utils/readSpecs.js:46:25
    at Array.forEach (native)
    at _callee$ (/Users/burdon/.config/yarn/global/node_modules/oao/lib/utils/readSpecs.js:45:22)
    at tryCatch (/Users/burdon/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/Users/burdon/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:303:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/burdon/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:117:21)
    at step (/Users/burdon/.config/yarn/global/node_modules/oao/lib/utils/readSpecs.js:24:191)
    at /Users/burdon/.config/yarn/global/node_modules/oao/lib/utils/readSpecs.js:24:361

Could you please give more details (monorepo structure, basically)?

I had the same error, it happened to me because the dir name of one of the packages didn't match the package name (as defined in package.json)

Is it a scoped package?

I saw this error when ./packages/my-pkg/package.json:name !== 'my-pkg'.
This error message needs to be more explicit -
https://github.com/guigrpa/oao/blob/master/src/utils/readSpecs.js#L63,
since the previous mainStory.error does not get logged to console.

Made the error more explicit. Thanks for the suggestion!

Shipped in v0.10.3 (published with oao publish --single, by the way!)