Skip to content

Instantly share code, notes, and snippets.

@alexito4

alexito4/error Secret

Last active August 3, 2018 21:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save alexito4/84e34ce6c66aa320d361781f1ffd946e to your computer and use it in GitHub Desktop.
Diagnostics:
pulumi:pulumi:Stack: ahoy-pulumi-ahoy-pulumi-dev
error: Error serializing '(ev, ctx, cb) => { let body; ...': api.js(234,106)
'(ev, ctx, cb) => { let body; ...': api.js(234,106): captured
variable 'route' which indirectly referenced
'(req, res) => { const options = { me ...': index.js(7,22): which captured
module 'http' which indirectly referenced
function '<anonymous>': http.js(30,26): which referenced
function 'ClientRequest': _http_client.js(18,22): which referenced
function 'OutgoingMessage': _http_outgoing.js(48,24): which captured
module 'stream' which indirectly referenced
function 'Stream': legacy.js(6,15): which referenced
function 'Writable': _stream_writable.js(157,17): which captured
'realHasInstance', a function defined at
function '[Symbol.hasInstance]': which could not be serialized because
it was a native code function.
Function code:
function [Symbol.hasInstance]() { [native code] }
Capturing modules can sometimes cause problems.
Consider using import('http') or require('http') inside '(req, res) => { const options = { me ...': index.js(7,22)
error: an unhandled error occurred: Program exited with non-zero exit code: 1
error: an error occurred while advancing the preview
import * as cloud from "@pulumi/cloud-aws";
import * as http from 'http';
const endpoint = new cloud.API("langs");
const counterTable = new cloud.Table("projectsTable", "project");
endpoint.get("/test", (req, res) => {
const options: http.RequestOptions = {
method: "POST",
host: "https://api.github.com",
path: "/graphql"
}
http.request(options, (gres) => {
res.status(200).json({ "data": JSON.stringify(gres) })
})
});
export const url = endpoint.publish().url;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment