serverless-plugin-typescript icon indicating copy to clipboard operation
serverless-plugin-typescript copied to clipboard

Overriding the servicePath breaks other plugins

Open SanderKnape opened this issue 2 years ago • 4 comments

Hello. This package overrides the servicePath, causing issues for other plugins that are now trying to find files (such as the schema.graphql) in the .build folder instead of the root.

I ran into this issue with the serverless-appsync-simulator, and I see it also causes issues when using Lambda layers.

Is there any chance this functionality can be changed to improve compatibility with other plugins?

SanderKnape avatar Oct 10 '21 14:10 SanderKnape

This also breaks serverless-azure-functions.

avafloww avatar Oct 17 '21 00:10 avafloww

Is there any timeframe for fixing this? Its an open dependency for working with lambda layers which is a common used pattern : https://github.com/serverless/serverless-plugin-typescript/issues/240

Without this fix this plugin is rendered useless in working with layers without including other plugins such as serverless-jetpack

alexandrubese avatar Oct 26 '21 09:10 alexandrubese

hello, i have a possible solution for this can someone give me the rights to open a PR please?

also, a workaround here is to include your graphql schema location in the pacakge.patterns array like so:

app: foobar
…
package:
  excludeDevDependencies: true
  patterns:
    - '!node_modules/aws-sdk'
    - '!node_modules/**/aws-sdk/**'
    - '!.vscode/**'
    - '!.dynamodb/**'
    - 'schema.graphql'
…

liam-ot avatar Feb 09 '23 00:02 liam-ot

@medikoo tagging you to point you to my comment above :)

liam-ot avatar Feb 09 '23 08:02 liam-ot