When running node version 14.x the lack of typescript definition causes an error, but this doesn't happen in node v16.x. Not sure exactly why but will PR the fix.
➜ node-vanilla node index.js
xxxxxx/node-vanilla/index.js:1
import { abbreviations } from '@vvo/tzdb';
^^^^^^^^^^^^^
SyntaxError: The requested module '@vvo/tzdb' does not provide an export named 'abbreviations'
at ModuleJob._instantiate (internal/modules/esm/module_job.js:92:21)
at async ModuleJob.run (internal/modules/esm/module_job.js:107:20)
at async Loader.import (internal/modules/esm/loader.js:179:24)
➜ node-vanilla nvm use v16.0.0
Now using node v16.0.0 (npm v7.10.0)
➜ node-vanilla node index.js
ACT
index.js:
import { abbreviations } from '@vvo/tzdb';
console.log(abbreviations[Object.keys(abbreviations)[0]]);
When running node version 14.x the lack of typescript definition causes an error, but this doesn't happen in node v16.x. Not sure exactly why but will PR the fix.
index.js: