You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are having difficulty setting up a local environment, running with sam local start-api which uses a shared dependency from our yarn workspace.
Steps
I have updated the make file to use yarn and replaced any instance of prefix with cwd
Added our local package, @claimsgate/core to the dependencies property in package.json
example.ts
ClaimsGatePermissions.Funnels.canEditPages.id is just a string literal value.
import"source-map-support/register";import{APIGatewayProxyEvent,APIGatewayProxyResult}from"aws-lambda";import{ClaimsGatePermissions}from"@claimsgate/core";/** * A simple example includes a HTTP get method. */exportconstexampleHandler=async(event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult>=>{// All log statements are written to CloudWatch
console.debug(ClaimsGatePermissions.Funnels.canEditPages.id);return{statusCode: 200,body: JSON.stringify({message: ClaimsGatePermissions.Funnels.canEditPages.id,}),};};
The following error is thrown when invoking the function.
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\Rayyan\\Desktop\\Work\\Media Advancements\\Projects\\claimsgate\\packages\\aws\\node_modules\\@claimsgate\\core\\node_modules\\@claimsgate\\core-types\\node_modules\\@firebase\\database-compat\\node_modules\\@firebase\\database\\dist\\node-esm\\src\\core\\AppCheckTokenProvider.d.ts'
Is there something we are missing here? Historically in other packages of ours, to use a local dependency from our monorepo, we have always been able to add it to package.json and just begin using its functionality. If there was an issue, it would only be during a deployment pipeline?
Any advice would be much appreciated!
The text was updated successfully, but these errors were encountered:
It appears that just having the package @claimsgate/core added to the package.json will cause the issue we are experiencing. Even if the example.ts makes no references to the package.
I believe this is an issue with path resolution with yarn classic on Windows but it's hard to figure out...
Can you run the AWS SAM locally in a docker environment?
We are having difficulty setting up a local environment, running with
sam local start-api
which uses a shared dependency from our yarn workspace.Steps
yarn
and replaced any instance ofprefix
withcwd
@claimsgate/core
to the dependencies property inpackage.json
example.ts
ClaimsGatePermissions.Funnels.canEditPages.id
is just a string literal value.The following error is thrown when invoking the function.
Is there something we are missing here? Historically in other packages of ours, to use a local dependency from our monorepo, we have always been able to add it to
package.json
and just begin using its functionality. If there was an issue, it would only be during a deployment pipeline?Any advice would be much appreciated!
The text was updated successfully, but these errors were encountered: