Skip to content

Instantly share code, notes, and snippets.

@cavaliercoder
Last active December 17, 2019 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cavaliercoder/43e7201db3d7050c554ef40e13d3b508 to your computer and use it in GitHub Desktop.
Save cavaliercoder/43e7201db3d7050c554ef40e13d3b508 to your computer and use it in GitHub Desktop.
tswtf
(node:46031) UnhandledPromiseRejectionWarning: NetworkingError: XMLHttpRequest is not defined
at t.constructor.t.constructor.handleRequest (/Users/rarmstrong/Development/volley/node/lambda/api/dist/index.js:8:209257)
at s (/Users/rarmstrong/Development/volley/node/lambda/api/dist/index.js:8:102022)
at constructor.<anonymous> (/Users/rarmstrong/Development/volley/node/lambda/api/dist/index.js:8:102421)
at constructor.callListeners (/Users/rarmstrong/Development/volley/node/lambda/api/dist/index.js:8:58229)
at constructor.emit (/Users/rarmstrong/Development/volley/node/lambda/api/dist/index.js:8:57968)
at constructor.emitEvent (/Users/rarmstrong/Development/volley/node/lambda/api/dist/index.js:8:125361)
at constructor.e (/Users/rarmstrong/Development/volley/node/lambda/api/dist/index.js:8:120912)
at r.runTo (/Users/rarmstrong/Development/volley/node/lambda/api/dist/index.js:8:127221)
at /Users/rarmstrong/Development/volley/node/lambda/api/dist/index.js:8:127427
at constructor.<anonymous> (/Users/rarmstrong/Development/volley/node/lambda/api/dist/index.js:8:121182)
(node:46031) 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:46031) [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.
{
"compilerOptions": {
"target": "ES2019",
"module": "commonjs",
"sourceMap": true,
"outDir": "./dist/",
"rootDir": "./src",
"strict": true,
"noImplicitAny": true,
"baseUrl": "./src",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
}
const path = require('path');
const defaults = {
mode: "production",
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: [ /node_modules/ ]
},
],
},
};
const api_lambda = {
...defaults,
target: 'node',
entry: './src/api-lambda/index.ts',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist/api-lambda'),
libraryTarget: 'commonjs'
}
};
module.exports = [ api_lambda ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment