PLhery / node-twitter-api-v2

Strongly typed, full-featured, light, versatile yet powerful Twitter API v1.1 and v2 client for Node.js.
https://www.npmjs.com/package/twitter-api-v2
Apache License 2.0
1.24k stars 174 forks source link

Invalid consumer tokens, Docker Image #514

Open BotJames312 opened 5 months ago

BotJames312 commented 5 months ago

I'm trying run my code on docker, but when i try make 'docker run -p 1000:1000 test' i receive this on Docker Desktop:

/usr/src/app/node_modules/twitter-api-v2/dist/cjs/client-mixins/request-maker.mixin.js:164
            throw new Error('Invalid consumer tokens');
            ^

Error: Invalid consumer tokens
    at ClientRequestMaker.buildOAuth (/usr/src/app/node_modules/twitter-api-v2/dist/cjs/client-mixins/request-maker.mixin.js:164:19)
    at ClientRequestMaker.initializeToken (/usr/src/app/node_modules/twitter-api-v2/dist/cjs/client-mixins/request-maker.mixin.js:121:32)
    at new TwitterApiBase (/usr/src/app/node_modules/twitter-api-v2/dist/cjs/client.base.js:18:32)
    at new TwitterApi (/usr/src/app/node_modules/twitter-api-v2/dist/cjs/client/index.js:14:1)
    at Object.<anonymous> (/usr/src/app/RedesSociais/Client.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)

I execute the code on vs code, and work normally.