asset-tracking icon indicating copy to clipboard operation
asset-tracking copied to clipboard

API Endpoint url giving "internal server error" message

Open mtrivedi09 opened this issue 4 years ago • 0 comments

After following all the steps for this project when I run the stack API endpoint URL i get the following message: {"message": "Internal server error"}

Since i am new to cloud computing (AWS, pulumi, etc) i am not sure where the problem lies.

My infrastructure preview was slightly different from the instructions ss as below: Screen Shot 2021-10-12 at 12 48 09 PM

Checking the logs in cloudwatch i came across the following error:

2021-10-12T16:03:44.361Z 1605df3c-6d01-418b-9df1-7b863f2e3087 ERROR Invoke Error { "errorType": "Error", "errorMessage": "Package subpath './dist/js/index.js' is not defined by "exports" in /var/task/node_modules/@turf/helpers/package.json", "code": "ERR_PACKAGE_PATH_NOT_EXPORTED", "stack": [ "Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/js/index.js' is not defined by "exports" in /var/task/node_modules/@turf/helpers/package.json", " at throwExportsNotFound (internal/modules/esm/resolve.js:299:9)", " at packageExportsResolve (internal/modules/esm/resolve.js:522:3)", " at resolveExports (internal/modules/cjs/loader.js:424:36)", " at Function.Module._findPath (internal/modules/cjs/loader.js:464:31)", " at Function.Module._resolveFilename (internal/modules/cjs/loader.js:802:27)", " at Function.Module._load (internal/modules/cjs/loader.js:667:27)", " at Module.require (internal/modules/cjs/loader.js:887:19)", " at require (internal/modules/cjs/helpers.js:74:18)", " at /var/task/__index.js:51:44", " at Runtime.__f0 [as handler] (/var/task/__index.js:114:6)" ] }

Doing some research on this error, it lead me to believe there is something wrong with the Lambda function created by the query (testing it on the lambda console also gives the error), but i cannot figure out what exactly. I have attached the function zip file for reference. Any help regarding this would be appreciated. Thank you!

mapboxQuery4c238266-4f5effe-d1205eea-5cad-4a4e-bf08-5c48634bfdc0.zip

mtrivedi09 avatar Oct 12 '21 17:10 mtrivedi09