phodal / adr

Architecture Decision Records in Node.js with Reporter, supported Windows, GNU/Linux, macOS - 轻量级架构决策记录工具

Home Page:https://phodal.github.io/adr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot create new file (Node 16)

areindl opened this issue · comments

  • I'm submitting a ...
    [ ] language request
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

I just get start with this tool.

I was sending this command on the CLI (I already init the folder - it worked):

adr new "no need for monorepo"

This is the error message:

/Users/anton/.nvm/versions/node/v16.14.1/lib/node_modules/adr/build/main/lib/create.js:35
    console.log(i18n.logSavePath + savePath);
                     ^

TypeError: Cannot read properties of undefined (reading 'logSavePath')
    at create (/Users/anton/.nvm/versions/node/v16.14.1/lib/node_modules/adr/build/main/lib/create.js:35:22)
    at /Users/anton/.nvm/versions/node/v16.14.1/lib/node_modules/adr/build/main/cli.js:23:29
    at Array.forEach (<anonymous>)
    at Command.<anonymous> (/Users/anton/.nvm/versions/node/v16.14.1/lib/node_modules/adr/build/main/cli.js:23:12)
    at Command.listener [as _actionHandler] (/Users/anton/.nvm/versions/node/v16.14.1/lib/node_modules/adr/node_modules/commander/index.js:413:31)
    at Command._parseCommand (/Users/anton/.nvm/versions/node/v16.14.1/lib/node_modules/adr/node_modules/commander/index.js:914:14)
    at Command._dispatchSubcommand (/Users/anton/.nvm/versions/node/v16.14.1/lib/node_modules/adr/node_modules/commander/index.js:865:18)
    at Command._parseCommand (/Users/anton/.nvm/versions/node/v16.14.1/lib/node_modules/adr/node_modules/commander/index.js:882:12)
    at Command.parse (/Users/anton/.nvm/versions/node/v16.14.1/lib/node_modules/adr/node_modules/commander/index.js:717:10)
    at Object.<anonymous> (/Users/anton/.nvm/versions/node/v16.14.1/lib/node_modules/adr/build/main/cli.js:78:9)
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Any idea? Am I doing it wrong?

It seems it's a language issues? Could you share you .adr.json ? like:

{"language":"en","path":"docs/adr/","prefix":"","digits":4}

@phodal thanks! you are right. I changed the config to en and it worked. I had it set to en-us.

Maybe this should be added to the docs.

Thanks for your help!

Sorry for it, maybe we need to follow the standard i18n spec.