Open seepine opened 1 month ago
Its hard to know without the source code. Usually this is caused by a dynamic require.
You can check in /Users/seepine/workspace/test-transfer/dist/worker1.js
for something like require(str)
and change it to require('./indexes')
perhaps.
ncc build app.ts -o dist
Hi, try index.ts
import fastify from "fastify";
const server = fastify({});
server.listen({
host: "0.0.0.0",
port: 3000
});
pnpm i fastify
pnpm i @vercel/ncc -D
Add scripts to package.json
"ncc": "ncc build index.ts -o dist-ncc"
And run
pnpm ncc
I ncc a fastify project with typeorm, run
ncc build app.ts -o dist
and like thisAnd try run
node index.js