Fix altcha require path for Node 18 compatibility

Node 18 enforces the package exports map; the deep path
'altcha/dist/lib/index.umd.cjs' is not exported, but 'altcha/lib' is.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chris 2026-06-11 14:43:53 -04:00
parent 0652339539
commit 9cac3a8e8a

View File

@ -11,7 +11,7 @@ const cors = require('cors');
const multer = require('multer');
const sharp = require('sharp');
const nodemailer = require('nodemailer');
const { createChallenge, verifySolution, sha: altchaSha } = require('altcha/dist/lib/index.umd.cjs');
const { createChallenge, verifySolution, sha: altchaSha } = require('altcha/lib');
const app = express();
const port = 3050;