Simone Gaiarin
12/13/2021, 5:48 PMnpx sst start
I get the following error:
Traceback (most recent call last):
File "/media/dataHD/development/startup/my-app/my-app/node_modules/@serverless-stack/core/src/runtime/shells/bootstrap.py", line 75, in <module>
module = import_module(args.handler_module)
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'src.c520f1aa'
a4bf9a48-382c-4a7f-97f6-85c830a2a7a6 ERROR ModuleNotFoundError: No module named 'src.c520f1aa'
undefined
thdxr
12/13/2021, 5:57 PMSimone Gaiarin
12/13/2021, 5:58 PMdef handler(event, context):
return {
"statusCode": 200,
"body": "Hello, World! Your request was received at {}.".format(event['requestContext']['time'])
}
thdxr
12/13/2021, 5:58 PMthdxr
12/13/2021, 5:58 PMSimone Gaiarin
12/13/2021, 5:59 PMimport * as sst from "@serverless-stack/resources";
export default class MyStack extends sst.Stack {
constructor(scope, id, props) {
super(scope, id, props);
// Create a HTTP API
const api = new sst.Api(this, "Api", {
defaultFunctionProps: {
srcPath: "src",
},
routes: {
"GET /": "lambda.handler",
}
});
// Show the endpoint in the output
this.addOutputs({
"ApiEndpoint": api.url,
});
}
}
thdxr
12/13/2021, 5:59 PMSimone Gaiarin
12/13/2021, 6:00 PMthdxr
12/13/2021, 6:04 PMSimone Gaiarin
12/13/2021, 6:04 PMthdxr
12/13/2021, 6:04 PMnpx sst update 0.54.2-next.0
thdxr
12/13/2021, 6:04 PMSimone Gaiarin
12/13/2021, 6:08 PMSimone Gaiarin
12/13/2021, 6:08 PMthdxr
12/13/2021, 6:09 PMthdxr
12/13/2021, 6:12 PMv0.54.2