Created
June 20, 2017 12:39
-
-
Save jchaffin/9525e2d863ee138250655e5d58e6ba31 to your computer and use it in GitHub Desktop.
warning user that currently node version is not designated for longterm support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let { config } = require('./config'); | |
if (config.env === "production" && !process.release.lts) { | |
process.emitWarning('Running node version without lts in production', { | |
code: 'NO_LTS_IN_PRODUCTION', | |
detail: `Node.js version ${process.version} is not scheduled for long-term-support \ | |
and may become unstable in the future.`.replace(/(\s{2,}(?!\b)|\t)/gm, '') | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment