node-api-client icon indicating copy to clipboard operation
node-api-client copied to clipboard

How to get this running in Node

Open alessioalex opened this issue 8 years ago • 5 comments

Hey there, how do I get this up and running with Node 6?

I'm getting this error:

ReferenceError: regeneratorRuntime is not defined

Thanks.

alessioalex avatar Feb 19 '17 11:02 alessioalex

@alessioalex you have to include babel polyfill as well as using appropriate babel presets to handle async/await. Check out this this node6 es6 preset

walleXD avatar Jun 08 '17 05:06 walleXD

Same question I had here. Why not support promises as well and give option for async/await. Haven't used babel so far for this project and I shouldn't have to just for a simple API call. Any alternatives?

josephrexme avatar Sep 17 '17 01:09 josephrexme

FWIW, with Node 8 well-established and with it, async/await, this lib should also expose either a Node8-compatible version, or something compiled down to promises with e.g. nodent.

STRML avatar Sep 17 '17 16:09 STRML

Still can't get this running in Node:

→ node
> a = require('@r/api-client')
Error: Cannot find module 'lodash/array'

I don't thinking including some babel polyfill is the way to go.

alessioalex avatar Apr 12 '18 09:04 alessioalex

+1 , surprising async/await isn't supported

mayeaux avatar Jul 08 '19 01:07 mayeaux