thegreenwebfoundation / green-cost-explorer

See how much of your cloud bill is spent on fossil fuels ,so you can do the right thing and switch. We're in a climate crisis, remember?
Apache License 2.0
171 stars 18 forks source link

Not published in npm? #24

Closed wmagda closed 4 years ago

wmagda commented 4 years ago

npx greencost does not work... npm ERR! 404 'greencost@latest' is not in the npm registry.

iloveangels commented 4 years ago

I noticed the same thing. :( Anne

mrchrisadams commented 4 years ago

Hey there folks, so sorry about this!

The package is installed here, and that readme made the assumption that the code had already been installed using: npm install @tgwf/green-cost-explorer and then running npx greencost.

https://www.npmjs.com/package/@tgwf/green-cost-explorer

Can you try running this instead?

npx @tgwf/green-cost-explorer

There's no checking for the env vars right now, so if you don't have deets , you'll get a stack trace a bit like this one:

npx @tgwf/green-cost-explorer

(node:54109) UnhandledPromiseRejectionWarning: UnrecognizedClientException: The security token included in the request is invalid.
    at Request.extractError (/Users/chrisadams/.npm/_npx/54109/lib/node_modules/@tgwf/green-cost-explorer/node_modules/aws-sdk/lib/protocol/json.js:51:27)
    at Request.callListeners (/Users/chrisadams/.npm/_npx/54109/lib/node_modules/@tgwf/green-cost-explorer/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/Users/chrisadams/.npm/_npx/54109/lib/node_modules/@tgwf/green-cost-explorer/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/chrisadams/.npm/_npx/54109/lib/node_modules/@tgwf/green-cost-explorer/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/chrisadams/.npm/_npx/54109/lib/node_modules/@tgwf/green-cost-explorer/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/chrisadams/.npm/_npx/54109/lib/node_modules/@tgwf/green-cost-explorer/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/chrisadams/.npm/_npx/54109/lib/node_modules/@tgwf/green-cost-explorer/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/chrisadams/.npm/_npx/54109/lib/node_modules/@tgwf/green-cost-explorer/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/chrisadams/.npm/_npx/54109/lib/node_modules/@tgwf/green-cost-explorer/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/Users/chrisadams/.npm/_npx/54109/lib/node_modules/@tgwf/green-cost-explorer/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
(node:54109) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:54109) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I'll can update the README, but I'd really appreciate some helping getting a simple try/catch check for this, for others coming to it for the first time.

iloveangels commented 4 years ago

Hi Chris,

Arbonne now has the green versus grey cost of our AWS Services.

Thank you!!! Anne Thorne

From: Anne Thorne Sent: Tuesday, May 5, 2020 6:17 PM To: thegreenwebfoundation/green-cost-explorer reply@reply.github.com; thegreenwebfoundation/green-cost-explorer green-cost-explorer@noreply.github.com Cc: Comment comment@noreply.github.com Subject: RE: [thegreenwebfoundation/green-cost-explorer] Not published in npm? (#24)

This is helped Chris!

I am getting another error… a permissions error that Arbonne’s AWS admin said he would fix tomorrow for me.

Arbonne is now a B Corp company. The information that the green cost explorer will give us, will, I think, be beneficial.

I’ll keep you posted.

Thank you again!! 🌼Anne

Anne Thorne Arbonne Principal Software Engineer Email: athorne@arbonne.commailto:athorne@arbonne.com Cell: 949-836-5893 Whatever be the character of life or its unexpected events – to the heart that loves, all is well. St. Thérèse de Lisieux ("The Little Flower")

From: Anne Thorne Sent: Tuesday, May 5, 2020 6:42 AM To: thegreenwebfoundation/green-cost-explorer reply@reply.github.com<mailto:reply@reply.github.com>; thegreenwebfoundation/green-cost-explorer green-cost-explorer@noreply.github.com<mailto:green-cost-explorer@noreply.github.com> Cc: Comment comment@noreply.github.com<mailto:comment@noreply.github.com>; Anne Thorne athorne@arbonne.com<mailto:athorne@arbonne.com> Subject: RE: [thegreenwebfoundation/green-cost-explorer] Not published in npm? (#24)

I am so happy about getting this answer!!!

I will try this and keep you posted.

THANK YOU!!!!

🌼Anne

Anne Thorne Arbonne Principal Software Engineer Email: athorne@arbonne.commailto:athorne@arbonne.com Cell: 949-836-5893 Whatever be the character of life or its unexpected events – to the heart that loves, all is well. St. Thérèse de Lisieux ("The Little Flower")