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.

Can't disable deprecation warning

See original GitHub issue

Deprecation warning is displayed when using sls command (i.e.sls package or sls -version) even when: a) SLS_DEPRECATION_DISABLE env var is specified (with LOAD_VARIABLES_FROM_ENV_FILES) b) when, in serverless.yml file there is the following conf:

disabledDeprecations:
  - LOAD_VARIABLES_FROM_ENV_FILES

Or '*' instead of LOAD_VARIABLES_FROM_ENV_FILES

`sls -version` output
Serverless: Deprecation warning: Detected ".env" files. Note that Framework now supports loading variables from those files when "useDotenv: true" is set (and that will be the default from next major release)
            More Info: https://www.serverless.com/framework/docs/deprecations/#LOAD_VARIABLES_FROM_ENV_FILES
Framework Core: 2.18.0
Plugin: 4.4.2
SDK: 2.3.2
Components: 3.4.6

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mfogelcommented, Feb 10, 2021

Thanks for the pointer @pgrzesik ! That thread was helpful

0reactions
medikoocommented, Dec 3, 2021

Closing as I believe it was already fixed (I cannot reproduce it.)

Note that disabledDeprecations setting in configuration works only for deprecations that are reported after the configuration file is parsed.

It’s only SLS_DEPRECATION_DISABLE env variables that works for deprecations reported at any point of command processing

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to ignore deprecation warnings in Python - Stack Overflow
When nothing else works: $ pip install shutup . Then at the top of the code import shutup;shutup.please() . This will disable all...
Read more >
How do I disable PHP Deprecated warnings? - cPanel Support
There are two methods in which to disable PHP deprecated warnings. Via WHM: 1. Log into WHM. 2. Go to WHM » Home...
Read more >
Q: Can't suppress deprecation warning for rb_tainted_str_new ...
Ok, for Reasons(tm), I want to run some CI on a project that uses Rails 5.0, using ruby 2.7.2. The tests actually all...
Read more >
4.10.4. Puppet Issues — SIMP 6.6.0-Alpha documentation
If you want to enable deprecation warnings again, change ensure => present to ensure => absent . Previous Next. © Copyright 2022, The...
Read more >
Compiler Warning (level 3) C4996 - Microsoft Learn
To turn off deprecation warnings for these functions, define the preprocessor macro _CRT_NONSTDC_NO_WARNINGS . You can define this macro at the ...
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