# Add Support for ES6/ES7 JavaScript

**URL:** <https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128>\
**Category:** Chapter Comments\
**Created:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128 "2018-05-09T19:50:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/1 "2018-05-09T19:50:21Z")

</div>

_From @jayair on Mon Apr 10 2017 00:59:18 GMT+0000 (UTC)_  
  
Link to chapter - [http://serverless-stack.com/chapters/add-support-for-es6-es7-javascript.html](http://serverless-stack.com/chapters/add-support-for-es6-es7-javascript.html)  
  
_Copied from original issue: [https://github.com/AnomalyInnovations/serverless-stack-com/issues/22](https://github.com/AnomalyInnovations/serverless-stack-com/issues/22)_

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/2 "2018-05-09T19:50:22Z")

</div>

_From @EisenbergEffect on Mon May 29 2017 06:13:50 GMT+0000 (UTC)_  
  
Any chance that you could show the same setup but using TypeScript instead?

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/3 "2018-05-09T19:50:22Z")

</div>

_From @jayair on Mon May 29 2017 10:41:21 GMT+0000 (UTC)_  
  
@EisenbergEffect We could, but we might have to create a completely separate TypeScript version of the tutorial. And that makes it a little lower on the priorities.

But we could look into creating a one off chapter just for the TypeScript setup.

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/4 "2018-05-09T19:50:23Z")

</div>

_From @EisenbergEffect on Mon May 29 2017 17:05:59 GMT+0000 (UTC)_  
  
I’d love to see one-off chapter, particularly on setting up TypeScript with the Serverless Stack. I’ve got setups for my front-ends framework but I’m new to the Serverless Stack so I wasn’t sure how to handle that part of it.

On a side note, I really love what you all have done here. Once I see how to get this setup with TS for Serverless, I’ll be using this as a foundation for a new side-project of mine. One difference will be that I’m using Aurelia instead of React, but all the front-end work should translate very easily.

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/5 "2018-05-09T19:50:23Z")

</div>

_From @EisenbergEffect on Tue May 30 2017 03:53:49 GMT+0000 (UTC)_  
  
@jayair I found this: [https://github.com/y13i/serverless-ts-example](https://github.com/y13i/serverless-ts-example)

Does that look like a “correct” configuration that would serve as a substitute for the equivalent Babel implementation?

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/6 "2018-05-09T19:50:23Z")

</div>

_From @jayair on Tue May 30 2017 13:03:59 GMT+0000 (UTC)_  
  
@EisenbergEffect I haven’t seen that before but I’ll need to play around with it. I hope there are some other TS folks that are willing to help out.

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/7 "2018-05-09T19:50:23Z")

</div>

_From @muescha on Mon Jul 17 2017 14:17:34 GMT+0000 (UTC)_  
  
what about the idea to implement a language switch where the user can switch the language flavor for the code samples - then it is easy to add step by step the TypeScript examples inline in the tutorial.

also this can be interesting to have an “easy javascript” vs “functional javascript” version - this addresses the #109 recommendations to use advanced functions for the examples.

or maybe some other languages can be implemented on demand

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/8 "2018-05-09T19:50:24Z")

</div>

_From @jayair on Tue Jul 18 2017 16:56:24 GMT+0000 (UTC)_  
  
@muescha I like the idea of having the sample project repos in multiple languages/setups. It would need some community contributions to get it up and running since I’m not much of a TypeScript user.

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/9 "2018-05-09T19:50:24Z")

</div>

_From @HyperBrain on Thu Aug 10 2017 13:15:47 GMT+0000 (UTC)_  
  
There have been a lot of updates to `serverless-webpack` recently and v3 is just around the corner now 😄 - a prerelease is already available as `serverless-webpack@3.0.0-rc.1`. The chapter should be updated (especially the `webpack.conf.js` part) to use the new automatic entry resolution which makes any manual entry file search obsolete (here: `globEntries()`).

This is already supported in the current version `2.2.0` of the plugin. See the V3 [readme/branch](https://github.com/elastic-coders/serverless-webpack/tree/v3.0.0) for details, what will change and is improved (includes the v2.2.0 changelog at the bottom too).

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/10 "2018-05-09T19:50:24Z")

</div>

_From @jayair on Thu Aug 10 2017 23:22:31 GMT+0000 (UTC)_  
  
@HyperBrain Thanks for letting us know. v3 looks really good! Congrats!

I’ll push out an update to the tutorial once it’s out because it changes a few things (including `webpack invoke`).

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/11 "2018-05-09T19:50:24Z")

</div>

_From @kenbankspeng on Thu Aug 24 2017 16:43:28 GMT+0000 (UTC)_  
  
Fantastic resource. Please consider mentioning facebook’s create-react-app.

create-react-app notes-app-api

and for typescript:

create-react-app notes-app-api --scripts-version=react-scripts-ts

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/12 "2018-05-09T19:50:25Z")

</div>

_From @jayair on Thu Aug 24 2017 18:36:20 GMT+0000 (UTC)_  
  
@kenbankspeng Thanks!

Are you referring to these commands while we create the API? I think you mean the frontend React app?

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/13 "2018-05-09T19:50:25Z")

</div>

_From @kenbankspeng on Thu Aug 24 2017 18:55:55 GMT+0000 (UTC)_  
  
I was initially thinking regarding both the API and the front end, but looks like create-react-app has other files added which are really only for a front end app, so may not be appropriate for the API. I just liked how create-react-app hid babel and webpack from me. Maybe a configuration option for typescript then. But beggars can’t be choosers…

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/14 "2018-05-09T19:50:25Z")

</div>

_From @lbybill on Thu Oct 12 2017 23:34:14 GMT+0000 (UTC)_  
  
I need help on: I am using ubuntu 16.04

```auto
$ serverless invoke local --function create --path mocks/create-event.json
Serverless: Bundling with Webpack...
Time: 587ms
    Asset Size Chunks Chunk Names
create.js 5 kB 0 [emitted] create
   [0] ./create.js 2.16 kB {0} [built]
   [1] external "babel-runtime/core-js/json/stringify" 42 bytes {0} [not cacheable]
   [2] external "uuid" 42 bytes {0} [not cacheable]
   [3] external "aws-sdk" 42 bytes {0} [not cacheable]

```

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/15 "2018-05-09T19:50:26Z")

</div>

_From @jayair on Fri Oct 13 2017 17:02:45 GMT+0000 (UTC)_  
  
@lbybill What’s the issue?

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/16 "2018-05-09T19:50:26Z")

</div>

_From @lbybill on Fri Oct 13 2017 18:03:36 GMT+0000 (UTC)_  
  
@jayair The process stops here. I thought this, “[not cacheable]”, is a error.

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/17 "2018-05-09T19:50:26Z")

</div>

_From @jayair on Fri Oct 13 2017 18:30:34 GMT+0000 (UTC)_  
  
@lbybill Oh no those messages are fine. But it looks like your `create` function did not print anything out. Have you completed this chapter - [https://serverless-stack.com/chapters/add-a-create-note-api.html](https://serverless-stack.com/chapters/add-a-create-note-api.html)?

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/18 "2018-05-09T19:50:26Z")

</div>

_From @lbybill on Fri Oct 13 2017 18:54:30 GMT+0000 (UTC)_  
  
@jayair Yes. I followed and finished this chapter.

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/19 "2018-05-09T19:50:27Z")

</div>

_From @jayair on Fri Oct 13 2017 19:44:35 GMT+0000 (UTC)_  
  
@lbybill You can follow the `console.log` to debug what is going on. We talk about it briefly at the bottom the chapter - [https://serverless-stack.com/chapters/add-a-create-note-api.html#common-issues](https://serverless-stack.com/chapters/add-a-create-note-api.html#common-issues).

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 7:50pm UTC](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128/20 "2018-05-09T19:50:27Z")

</div>

_From @lbybill on Fri Oct 13 2017 23:01:19 GMT+0000 (UTC)_  
  
@jayair I got this error. I am behind a firewall. I setup proxy already.

`aws dynamodb scan --table-name notes --region us-east-2` in command line works for me.  
I am wondering if sls need proxy too?

```auto
{ [TimeoutError: Connection timed out after 120000ms]
  message: 'Connection timed out after 120000ms',
  code: 'TimeoutError',
  time: Fri Oct 13 2017 15:01:17 GMT-0700 (PDT),
  region: 'us-east-2',
  hostname: 'dynamodb.us-east-2.amazonaws.com',
  retryable: true }

```

[Next page](https://discourse.sst.dev/t/add-support-for-es6-es7-javascript/128.md?page=2)
