code-narrator icon indicating copy to clipboard operation
code-narrator copied to clipboard

code-narrator.config.js default error

Open tomisanhues2 opened this issue 3 years ago • 2 comments

Hey, I just generated a new config for the first time and when I try to run it I get the following error:

npx code-narrator
apps\byf_modelo1\code-narrator.config.js:79
            User-Agent: "OpenAI/NodeJS/3.2.1",
                ^

SyntaxError: Unexpected token '-'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at node_modules\code-narrator\dist\src\utils\CliHelper.js:73:96
    at async CliHelper.getConfig (node_modules\code-narrator\dist\src\utils\CliHelper.js:73:30)
    openai: {
      basePath: "https://api.openai.com/v1",
      axios: undefined,
      configuration: {
        apiKey: "SECRET-KEY-HIDDEN",
        organization: undefined,
        username: undefined,
        password: undefined,
        accessToken: undefined,
        basePath: undefined,
        baseOptions: {
          headers: {
            User-Agent: "OpenAI/NodeJS/3.2.1",
            Authorization: "Bearer SECRET-KEY-HIDDEN",
          },
        },
        formDataCtor: undefined,
      },
    },
    ```
I have slightly cut the paths for privacy purposes.

tomisanhues2 avatar May 26 '23 21:05 tomisanhues2

same for me

hurradieweltgehtunter avatar Jun 06 '23 07:06 hurradieweltgehtunter

@tomisanhues2 @hurradieweltgehtunter

Sorry for the late reply guys, my mistake of not having notifications enabled on the project

New version has been deployed, 1.0.17 which should fix the problem.

Before running 'npx code-narrator', delete code-narrator.js and let it generate it again

ingig avatar Jun 27 '23 12:06 ingig