The problem of the server not working outside the file

I got the build by typing pkg . –targets node18-win-x64 in the terminal to get the build of the backend part of my project that I created using Node.js. The main problem here is that while there is no problem when the server is inside the files, there is a problem in seeing the modules when the server is taken out of the file. What could be the solution to this?

I tried to change dependencies but i didn’t get any result from this