opencommit icon indicating copy to clipboard operation
opencommit copied to clipboard

[Bug]: TypeError: Cannot read properties of undefined (reading 'OCO_OPENAI_BASE_PATH')

Open danielorozco06 opened this issue 1 year ago • 23 comments

Opencommit Version

3.0.3

Node Version

v16..20.2

NPM Version

8.19.4

What OS are you seeing the problem on?

Other Linux Distro

What happened?

I am using Ubuntu 22.04 on WSL v2

When launch this command: oco config set OCO_OPENAI_API_KEY=APIKEY

I have this error: ┌ opencommit — config │ └ ✖ TypeError: Cannot read properties of undefined (reading 'OCO_OPENAI_BASE_PATH')

That problem was not presented before. Only when reinstall oco after a OS reformatting.

Expected Behavior

That I can set my openai api key

Current Behavior

There is an error when set openai api key

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

danielorozco06 avatar Sep 07 '23 15:09 danielorozco06

Me to on MacBook Pro M1

enesj avatar Sep 07 '23 17:09 enesj

+1

roonie007 avatar Sep 09 '23 22:09 roonie007

Me too, MacBook Pro M2

Emkacf avatar Sep 11 '23 08:09 Emkacf

Will fix this week

di-sukharev avatar Sep 11 '23 14:09 di-sukharev

@di-sukharev Is there a temporary fix until it's fixed?

AlexandrosMelissas avatar Sep 12 '23 09:09 AlexandrosMelissas

@di-sukharev Is there a temporary fix until it's fixed?

@AlexandrosMelissas For me setting up .env per repository works fine, there you can add your api key

Emkacf avatar Sep 12 '23 09:09 Emkacf

+1

StephaneLASOUR avatar Sep 12 '23 15:09 StephaneLASOUR

+1

rahul-ponce avatar Sep 13 '23 14:09 rahul-ponce

+1

ArnaudGadbin2 avatar Sep 14 '23 08:09 ArnaudGadbin2

+1

Me too, Windows 10.

deividgp avatar Sep 14 '23 11:09 deividgp

Opencommit Version

3.0.3

Node Version

v16..20.2

NPM Version

8.19.4

What OS are you seeing the problem on?

Other Linux Distro

What happened?

I am using Ubuntu 22.04 on WSL v2

When launch this command: oco config set OCO_OPENAI_API_KEY=APIKEY

I have this error: ┌ opencommit — config │ └ ✖ TypeError: Cannot read properties of undefined (reading 'OCO_OPENAI_BASE_PATH')

That problem was not presented before. Only when reinstall oco after a OS reformatting.

Expected Behavior

That I can set my openai api key

Current Behavior

There is an error when set openai api key

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

Me, too on MacBook Intel

evanmarshall-dev avatar Sep 15 '23 22:09 evanmarshall-dev

```shell
echo OCO_OPENAI_API_KEY=<your OpenAI API token> >> ~/.opencommit

.. will get things working.

Worked for me! Thank you.

evanmarshall-dev avatar Sep 15 '23 22:09 evanmarshall-dev

getting to it tomorrow, too busy

di-sukharev avatar Sep 17 '23 11:09 di-sukharev

@danielorozco06 @enesj @roonie007 hey guys, please install 3.0.4 and tell me if it works: npm i -g opencommit@latest

di-sukharev avatar Sep 18 '23 06:09 di-sukharev

@danielorozco06 @enesj @roonie007 hey guys, please install 3.0.4 and tell me if it works: npm i -g opencommit@latest

It works for me now, appreciated. 😄

deividgp avatar Sep 18 '23 11:09 deividgp

@deividgp great <3

di-sukharev avatar Sep 18 '23 11:09 di-sukharev

not working for me : 'OCO_OPENAI_API_KEY' name is invalid, it should be either 'OCO_OCO_OPENAI_API_KEY' or it doesn't exist. context: I'm using nvm

StephaneLASOUR avatar Sep 18 '23 13:09 StephaneLASOUR

@StephaneLASOUR have you just updated to latest version from some really old one?

di-sukharev avatar Sep 19 '23 03:09 di-sukharev

@StephaneLASOUR have you just updated to latest version from some really old one?

Yes I did, from 1.1.24

StephaneLASOUR avatar Sep 19 '23 09:09 StephaneLASOUR

@StephaneLASOUR major versions are breaking changes, so you should remove ~/.opencommit file and install and config everything again

di-sukharev avatar Sep 19 '23 14:09 di-sukharev

Me to on MacBook Pro M1

Works now. Thanks.

enesj avatar Sep 19 '23 16:09 enesj

Stale issue message

github-actions[bot] avatar Oct 29 '23 21:10 github-actions[bot]