thdxr
12/10/2021, 9:01 PMRoss Coundon
12/10/2021, 9:02 PMRoss Coundon
12/10/2021, 10:01 PMError: There was a problem transpiling the Lambda handler.
at Object.bundle (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@serverless-stack/core/dist/runtime/handler/node.js:149:23)
at Object.bundle (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@serverless-stack/core/dist/runtime/handler/handler.js:30:16)
at new Function (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@serverless-stack/resources/src/Function.ts:338:39)
at new OmwOfscBeStack (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/stacks/OmwOfscBeStack.ts:146:33)
at Object.main (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/stacks/index.ts:117:3)
at Object.<anonymous> (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/.build/run.js:94:16)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
We are referencing an esbuild plugin like so:
props.bundle = {
esbuildConfig: {
plugins: 'config/esbuild.js',
},
externalModules: ['@thundra/core'],
nodeModules: ['@aws-sdk/client-dynamodb', '@aws-sdk/client-sqs', '@aws-sdk/client-s3', '@aws-sdk/client-ssm'],
};
app.setDefaultFunctionProps(props);
esbuild.js file looks like
const { ThundraEsbuildPlugin } = require('@thundra/esbuild-plugin');
module.exports = {
plugins: [
ThundraEsbuildPlugin({
traceableConfigs: ['src.main.*.*[traceLineByLine=true]'],
}),
],
};
thdxr
12/10/2021, 10:05 PMthdxr
12/10/2021, 10:06 PMRoss Coundon
12/10/2021, 10:16 PMRoss Coundon
12/10/2021, 10:22 PMRoss Coundon
12/10/2021, 10:33 PM$ cd /tmp/seed/source
INFO: before_build hook not found. You can define it in your build spec.
INFO: Learn more about adding a build spec - seed.run/docs/adding-a-build-spec
$ cd /tmp/seed/source/.
$ npx sst build --stage eon-test --region eu-west-2 --verbose
0.77 s
Unexpected token '.'
ERROR: There was an error synthesizing your app.
thdxr
12/10/2021, 10:38 PMthdxr
12/10/2021, 10:38 PMsst build
locally give you the same problem?Ross Coundon
12/10/2021, 10:40 PMthdxr
12/10/2021, 10:42 PMthdxr
12/10/2021, 10:42 PMFrank
Frank
bc5d31f
from v56) and see if that works?Ross Coundon
12/11/2021, 10:14 AMRoss Coundon
12/11/2021, 10:14 AMFrank
Ross Coundon
12/11/2021, 10:17 AMRoss Coundon
12/11/2021, 10:18 AMFrank
Frank
sst build
fail like that Unexpected token '.'
Frank
Ross Coundon
12/11/2021, 10:25 AMRoss Coundon
12/11/2021, 12:10 PMmodule.exports = [
ThundraEsbuildPlugin({
traceableConfigs: ['src.main.*.*[traceLineByLine=true]'],
}),
];
Frank
Frank
Frank
Ross Coundon
12/12/2021, 6:56 AMRoss Coundon
12/12/2021, 1:17 PMFrank
Ross Coundon
12/13/2021, 9:07 AMI’m curious if you are using a newer Node version locally. Can you try switching the service to General Purpose v4.0, and give it a try?`
Ross Coundon
12/13/2021, 6:17 PMSam Hulick
12/13/2021, 11:06 PMSam Hulick
12/13/2021, 11:06 PMthdxr
12/13/2021, 11:34 PM