alvarcarto / url-to-pdf-api

Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
MIT License
7.03k stars 779 forks source link

Revert "Node upgrade" #197

Closed kimmobrunfeldt closed 1 year ago

kimmobrunfeldt commented 1 year ago

Reverts alvarcarto/url-to-pdf-api#182

kimmobrunfeldt commented 1 year ago

Broke tests

➜  url-to-pdf-api git:(master) ✗ npm test

> url-to-pdf-api@1.0.0 test
> mocha --timeout 60000 && npm run lint

TypeError: winston.Logger is not a constructor
    at createLogger (/Users/personal/code/url-to-pdf-api/src/util/logger.js:11:18)
    at Object.<anonymous> (/Users/personal/code/url-to-pdf-api/src/app.js:6:40)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/personal/code/url-to-pdf-api/test/test-all.js:9:19)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:190:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
    at async formattedImport (/Users/personal/code/url-to-pdf-api/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
    at async Object.exports.requireOrImport (/Users/personal/code/url-to-pdf-api/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
    at async Object.exports.loadFilesAsync (/Users/personal/code/url-to-pdf-api/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
    at async singleRun (/Users/personal/code/url-to-pdf-api/node_modules/mocha/lib/cli/run-helpers.js:125:3)
    at async Object.exports.handler (/Users/personal/code/url-to-pdf-api/node_modules/mocha/lib/cli/run.js:370:5)