You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 15, 2026. It is now read-only.
I get this error when using the example code at the top of index.d.ts:
Users-MacBook-Pro:twitter-lite-test danbock$ ts-node dev.ts
/Users/danbock/code/twitter-lite-test/dev.ts:3
const twitter = new Twitter({
^
TypeError: twitter_lite_1.Twitter is not a constructor
at Object.<anonymous> (/Users/danbock/code/twitter-lite-test/dev.ts:3:17)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Module.m._compile (/Users/danbock/.nvm/versions/node/v12.16.2/lib/node_modules/ts-node/src/index.ts:836:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Object.require.extensions.<computed> [as .ts] (/Users/danbock/.nvm/versions/node/v12.16.2/lib/node_modules/ts-node/src/index.ts:839:12)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at main (/Users/danbock/.nvm/versions/node/v12.16.2/lib/node_modules/ts-node/src/bin.ts:226:14)
at Object.<anonymous> (/Users/danbock/.nvm/versions/node/v12.16.2/lib/node_modules/ts-node/src/bin.ts:485:3)
I reproduced this on a blank project. Just ran npm install twitter-lite and copied this code into a blank file and ran it using ts-node. Got the same error.
import { Twitter } from 'twitter-lite';
const twitter = new Twitter({
consumer_key: 'XYZ',
consumer_secret: 'XYZ',
access_token_key: 'XYZ',
access_token_secret: 'XYZ'
});
I get this error when using the example code at the top of index.d.ts:
I reproduced this on a blank project. Just ran
npm install twitter-liteand copied this code into a blank file and ran it using ts-node. Got the same error.