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
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.
The text was updated successfully, but these errors were encountered:
Hi, know this is a bit late but it's most likely just a problem with your .env file (if that's what you're using). I had this same issue when I had my .env file outside of the folder I was running a script from.
Let's say I have my .env file in user/project/.env
and I have my script in user/project/scripts/test.js
Then I run cd c:/user/project/scripts/ and then node test.js i'll get this same error as you, that's because the .env file currently isn't a enviroment variable that's being ran since it's "outside" of what i'm trying to run.
But if I were to run cd c:/user/project and then node scripts/test.js it'll run without any issues since it's now an enviroment variable.
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:
I execute the code on vs code, and work normally.
The text was updated successfully, but these errors were encountered: