CyberPunkMetalHead/cryptocurrency-gpt

Problem in running the code

Opened this issue ยท 9 comments

Getting this error, I've just cloned the repo and tried npm run dev with all the packages installed and I'm getting this error. Any leads how to get it resolved?
I've already placed the api_key in the openAI function

hamza@M1-Max cryptocurrency-gpt % npm run dev

> dev
> astro dev

  ๐Ÿš€  astro  v2.9.0 started in 72ms
  
  โ”ƒ Local    http://localhost:3000/
  โ”ƒ Network  use --host to expose
  
 error   Request failed with status code 401
  File:
    /Users/hamza/Development/Work/cryptocurrency-gpt/node_modules/openai/node_modules/axios/lib/core/createError.js:16:15
  Code:
    15 | module.exports = function createError(message, config, code, request, response) {
    > 16 |   var error = new Error(message);
         |               ^
      17 |   return enhanceError(error, config, code, request, response);
      18 | };
  Stacktrace:
Error: Request failed with status code 401
    at createError (/Users/hamza/Development/Work/cryptocurrency-gpt/node_modules/openai/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/Users/hamza/Development/Work/cryptocurrency-gpt/node_modules/openai/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/Users/hamza/Development/Work/cryptocurrency-gpt/node_modules/openai/node_modules/axios/lib/adapters/http.js:322:11)
    at IncomingMessage.emit (node:events:526:35)
    at endReadableNT (node:internal/streams/readable:1408:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Same error.

same

Any solution?

have you tried updating to the latest version of astro?

have you tried updating to the latest version of astro?

I would have a try

Maybe also worth clearing all your npm packages and then doing a clean install npm ci

have you tried updating to the latest version of astro?

Tried. No use

Maybe also worth clearing all your npm packages and then doing a clean install npm ci

Tried. No use

Same error here, tried "npm audit fix --force" and "npm ci", no help