I want to create a build file for node and run it but I am facing errors on my local machine.
I've produced a build file using npm run build
. Copied it to another directory with package-lock.json
and installed them, and ran npm run preview
to preview it but it is giving me this error:
However, when I run the same build inside my project directory, it works, but when I copy it out and paste the build folder in another directory then it gives me this error.
What is happening?