Scopevisio / eudgc

A totally free (Apache 2.0) implementation of the Covid Vaccination Certifcate parsing and validation (more accurately EuDGC) in Javascript/Typescript. This works completely on the client side if needed. Serverside is possible too of course.
23 stars 14 forks source link

import does not work on serverside (node/typescript) #6

Open heazog opened 3 years ago

heazog commented 3 years ago

This package does not work for me on node (typescipt).

Reproduce:

@types/eudgc does not exist

srutz commented 3 years ago

Hi Heazog, i have just checked. It works in principle. Maybe you can elaborate on the error... Your error line says something like

index.ts:2:21 - error TS7016: Could not find a declaration file for module 'eudgc'. '.../tmp/typescript/node_modules/eudgc/dist/eudgc.js' implicitly has an 'any' type.
  Try `npm install @types/eudgc` if it exists or add a new declaration (.d.ts) file containing `declare module 'eudgc';`

which makes me wonder, whether you are working with plain Javascript (and ES6 Modules) or with Typescript. If working with Javascript on the Serverside, it is most likely without Babel.js... Is that your setup?

/Stepan