What version of wrangler are you using? It looks extremely old.
What version of wrangler are you using? It looks extremely old.
wrangler .... or npm exec wrangler ... it throws the error abovewas compiled against a different Node.js version using NODE_MODULE_VERSION 111

wrangler ....npm exec wrangler ...D1_ERROR: internal errorapp.onError(async (err, ctx) => {
if (err instanceof HTTPException) {
const msg = await err.res.text();
return ctx.json({ message: msg }, err.status);
} else {
if (ctx.env.ENVIRONMENT != 'development') {
const { url, method } = ctx.req.raw;
let jsonBody = '';
if (method == 'POST' || method == 'PUT') {
jsonBody = await ctx.req.json();
}
await postToDiscord(
err.message,
JSON.stringify(
{
url: url,
method: method,
data: jsonBody,
},
null,
2
)
);
}
return ctx.json({ message: 'Server error' }, 500);
}
});