openai-quickstart-node icon indicating copy to clipboard operation
openai-quickstart-node copied to clipboard

npm run dev not working

Open TommeZ opened this issue 2 years ago • 2 comments

When I reopen the project and try running the "npm run dev command", the following is displayed:

ready - started server on 0.0.0.0:3000, url: http://localhost:3000/ info - Loaded env from C:\Users...\openai-quickstart-node-master.env

However, when I click on the local host link, the web page doesn't load. Does anyone know why?

TommeZ avatar Oct 07 '22 06:10 TommeZ

"wait - compiling... event - compiled client and server successfully in 319 ms (113 modules)"

These parts seem to be missing the second time around. It just sits on the "info" part when it loads the env.

TommeZ avatar Oct 07 '22 08:10 TommeZ

It works with me. Im running mine on Safari. Although, I could get the page to load, I couldn't get the AI to work. I noticed after "wait - compiling", it said "Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db"

After updating the "Browserslist" the application now works for me.

Check if yours needs updating also and see if that helps. Have you also remembered to input your own API key from openai?

Hopefully this is helpful to you.

Jozebel11 avatar Dec 05 '22 23:12 Jozebel11

I'm not sure why, but deleting the .next folder and running the 'npm run dev' command after, resolves this issues for me.

TommeZ avatar Dec 07 '22 08:12 TommeZ