Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable the plugin #174

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

SvetislavMarjanovic
Copy link

@SvetislavMarjanovic SvetislavMarjanovic commented Aug 19, 2019

There is a way to disable the plugin.

Error:

Unhandled rejection Error: ENOENT: no such file or directory, symlink 'home/../node_modules' -> '/home/.build/node_modules'

Use case:

We use plugin for serverless project. There are few different stacks and we use parametrized serverless to include what we need for every specific stack. Sometimes we only wrap cloudformation template within serverless and deploy it. That was a requirement.

Description

When we don't have functions (lambdas) within that stack and have only wrapped cloudformation template, plugin throws the following error:
Unhandled rejection Error: ENOENT: no such file or directory, symlink 'home/../node_modules' -> '/home/.build/node_modules'
That means that serverless don't create .build aidirectory because plugin can not exclude node_modules and than deploying and packaging fails.

Solution:

Obviously, we need possibility to disable plugin at least in this situation. I added 2 ways to do that.

1.Adding a typescriptPlugin section to the custom section of your serverless.yml to set default value if needed:

custom:
  typescriptPlugin:
    enabled: false
  1. Passing the following command line option to serverless command:
    --typescript-plugin [disabled|off|false]

The second option will override default value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants