Problem in running the code
Opened this issue ยท 9 comments
mhmzdev commented
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)
NorbiXD commented
Same error.
danipolo commented
same
monk-after-90s commented
Any solution?
CyberPunkMetalHead commented
have you tried updating to the latest version of astro?
monk-after-90s commented
have you tried updating to the latest version of astro?
I would have a try
CyberPunkMetalHead commented
Maybe also worth clearing all your npm packages and then doing a clean install npm ci
monk-after-90s commented
have you tried updating to the latest version of astro?
Tried. No use
monk-after-90s commented
Maybe also worth clearing all your npm packages and then doing a clean install
npm ci
Tried. No use
Ransku90 commented
Same error here, tried "npm audit fix --force" and "npm ci", no help