-
Notifications
You must be signed in to change notification settings - Fork 0
Development: How to handle error when start next‐ai for developement
well this is my first wiki on this startup. I just wanna share my experience when develop this Repos next-ai. Hope you enjoy read this sh*t wiki 😏.
Lets begin....
so when develop this project. i found some bug (of course) like when i implement Langchain Chunk method is called RecursiveTextSplitter it make me stressed out.... and how i solve that bug ? i just refactor our next-ai into typescript. Because before implement langchain, i just build a simple express with javascript. Nah, after that that bug solved.... but wait, is not eazzzy like that, so many errors comes like meteor through the sky after that... 🌠🌠🌠... But don't worry i will show you how to handle that. i am already mention it on this Commit. The problem from that bug is, we need to run build first then start the development. that's weird right ??? because sometimes we just need clone the project, install some depedencies and start run dev to show any changes from our development activity.
That bug come from when we implement tsconfig-paths/register. it will working well on development, but when we just build it nodejs cannot read our paths like this
import router from '@routes/app'
that code only work with typescript, so we need add module-aliases to solve this. but it still not working well, i need to add that module aliases on tsconfig.json, and still error. until i found solution with perplexity here.... my discussion with Ai
.
Conclussion: We need add moduleAliases on package.json instead of tsconfig.json and problem solve ? yes of course. but you need run build then run dev. you will not trigger with error comes from, like me i dunno where is error until i found it.
SO... in this wiki i just want to tell you to need run build then run dev with your npm.
Maybe that's it. hope you understand, if not. you can mention in the future. i am still here, Cheeerrss🍺 ZakaCoding