Closed framerate closed 8 years ago
Further to this if you require 'babel-polyfill" the routes do actually function correctly. Is it intended to eat code?
Yeah I wouldn't expect it to work without the polyfill, but I would expect to be notified of my error...
Although I recognize this could be so many other things... use of promises perhaps... But overall this is a dead simple hapi boilerplate with 2 routes.
This is looking to not be a hapi error but an ES6 Promises error.
More info here:
http://jamesknelson.com/are-es6-promises-swallowing-your-errors/
I cut/paste a large chunk of code from another project into a brand new route. It passes my ESLint and seems ok at first glance.
When I view my index (not the new route) I get:
The error turns out to be the code contained ES6 destructuring which node didn't support.
There are no errors in my console from node nor hapi.
I'm new to Hapi but I feel like anything like this in Express or other frameworks they crash out and tell me "Unexpected Syntax: Line 102".
Any help would be appreciated.