Tried to set strict-ssl to false in .nmprc file, but process.env.npm_config_strict_ssl return blank string. So, this setting is not worked. Can this problem be fixed in the next version?
Cause by:
When npm-lifycycle dealing config values what It's return a '' when the value is !value
Object.keys(opts.config).forEach(function (i) {
// in some rare cases (e.g. working with nerf darts), there are segmented
// "private" (underscore-prefixed) config names -- don't export
if ((i.charAt(0) === '_' && i.indexOf('_' + namePref) !== 0) || i.match(/:_/)) {
return
}
var value = opts.config[i]
if (value instanceof Stream || Array.isArray(value) || typeof value === 'function') return
if (i.match(/umask/)) value = umask.toString(value)
if (!value) value = ''
else if (typeof value === 'number') value = '' + value
else if (typeof value !== 'string') value = JSON.stringify(value)
if (typeof value !== 'string') {
return
}
Tried to set
strict-ssl
to false in .nmprc file, butprocess.env.npm_config_strict_ssl
return blank string. So, this setting is not worked. Can this problem be fixed in the next version?Cause by: When
npm-lifycycle
dealing config values what It's return a''
when the value is!value
Source link: https://github.com/npm/npm-lifecycle/blob/latest/index.js#L464
npm version: 6.14.7
.npmrc config
Incorrect souce code
Resolved source code ( PR: #200 )