Logo-amall

Functions problem with pdf2json

Last active 8 days ago

9 replies

1 views

  • OS

    I am getting this error:
    [nodemon] startingtsx /server.ts ./functions/package.json`

    undefined:1235
    nodeUtil.p2jlog = log;
    ^
    ReferenceError: nodeUtil is not defined
    at eval (eval at (/opt/project/functions/nodemodules/.pnpm/pdf2json@3.0.2/nodemodules/pdf2json/lib/pdf.js:2:2950), :1235:1)
    at (/opt/project/functions/nodemodules/.pnpm/pdf2json@3.0.2/nodemodules/pdf2json/lib/pdf.js:66:1)
    at Object. (/opt/project/functions/nodemodules/.pnpm/pdf2json@3.0.2/nodemodules/pdf2json/lib/pdf.js:194:22)
    at Module.compile (node:internal/modules/cjs/loader:1155:14) at Object.v (/usr/local/lib/nodemodules/tsx/nodemodules/@esbuild-kit/cjs-loader/dist/index.js:1:901) at Module.load (node:internal/modules/cjs/loader:1033:32) at Function.Module.load (node:internal/modules/cjs/loader:868:12)
    at Module.require (node:internal/modules/cjs/loader:1057:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at (/opt/project/functions/nodemodules/.pnpm/pdf2json@3.0.2/nodemodules/pdf2json/pdfparser.js:6:19)`

    What could be the problem? It is working fine locally.
    It is self-hosted , what Node version is used there?

  • OS

    in container env I can see: NODE_VERSION=16.18.1 and locally I am using 16.18.0 so it is not the node…

  • OS

    Just locally I am using npm not pnpm

  • EL

    @oskar Do you have example code you can share so we can try to reproduce this locally?

  • EL

    You can also create an issue here:

  • EL

    We're using Node 16 here: https://github.com/nhost/functions/blob/main/Dockerfile#L1

  • OS

    sure
    https://gist.github.com/Rigel772/1ccd21500cc693efc9f6b75003549bab

  • EL

    That's create, would you mind creating an issue so we don't loose track of this?

  • OS

    done, thanks
    https://github.com/nhost/nhost/issues/1542

Last active 8 days ago

9 replies

1 views