question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

1.2.0 breaks serverless interpolation

See original GitHub issue

Hi there,

I love your plugin and I use it for my current pet project. I guess something has broken in the last version. This works in 1.1.5

custom:
  dotenv:
    path: .${self:provider.stage}.env

It will load stage specific files like .dev.env. In 1.2.0 it can’t find the file anymore. envPath is just .${self:provider.stage}.env. I think this related to change when the plugin loads the env file.

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

4reactions
colynbcommented, Aug 7, 2018

Yeah it turns out that I accidentally introduced a breaking change. There’s an issue where I couldn’t do variable interpolation on the provider section like when you want to use an env var for setting the region. The fix for that introduced a chicken and egg problem that I need to fix.

On Tue, Aug 7, 2018 at 2:54 PM Benjamin Otto notifications@github.com wrote:

Hi there,

I love your plugin and I use it for my current pet project. I guess something has broken in the last version. This works in 1.1.5

custom: dotenv: path: .${self:provider.stage}.env

It will load stage specific files like .dev.env. In 1.2.0 it can’t find the file anymore. envPath https://github.com/infrontlabs/serverless-dotenv-plugin/blob/master/index.js#L21 is just .${self:provider.stage}.env. I think this related to change when the plugin loads the env file.

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/infrontlabs/serverless-dotenv-plugin/issues/19, or mute the thread https://github.com/notifications/unsubscribe-auth/ABACJHQPNO7Vm9hQIqaQkoNUwwHelqSuks5uOgyugaJpZM4Vy84r .

0reactions
otbecommented, Sep 25, 2018

Dont know 😕 At a first glance I thought --env is an alias to set NODE_ENV and I skipped the rest of the docs. But its mentioned quite well that --env should be used if you cant set NODE_ENV. So this should be fine 🤔

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable serverless variables on keys as well #2892 - GitHub
I faced it when tried to set the next policy in serverless.yml: ... identity pool rolemappings without key interpolation in serverless.yml?
Read more >
Variables - Serverless Framework
The Serverless framework gives you an intuitive way to reference multiple variables as a fallback strategy in case one of the variables is...
Read more >
Homepage - AWS Lambda Powertools for TypeScript
A suite of utilities for AWS Lambda functions running on the Node.js runtime, to ease adopting best practices such as tracing, structured ...
Read more >
Terraform AWS Provider Version 4 Upgrade Guide
8.0 of the AWS Provider introduce significant breaking changes to the aws_s3_bucket resource. See S3 Bucket Refactor for more details. We recommend upgrading...
Read more >
Changelog - Prefect Docs
1.2.0 beta ... Fix the broken URL displayed in entrypoint.sh - #5490 ... Fix interpolation of config for dev services CLI for Apollo...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found