You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[eval]:1
process.env.toString()
^
TypeError: Cannot convert a Symbol value to a string
at Object.toString (<anonymous>)
at [eval]:1:13
at ContextifyScript.Script.runInThisContext (vm.js:26:33)
at Object.exports.runInThisContext (vm.js:79:17)
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:573:32)
at Immediate.<anonymous> (bootstrap_node.js:383:29)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)
This works as expected with v7.1.0.
The text was updated successfully, but these errors were encountered:
1aa595e introduced a `throw` for accessing `Symbol` properties of
`process.env`. However, this breaks `util.inspect(process)` and
things like `Object.prototype.toString.call(process.env)`, so this
patch changes the behaviour for the getter to just always return
`undefined`.
Ref: nodejs#9446Fixes: nodejs#9641
PR-URL: nodejs#9631
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
node -e 'process.env.toString()'
gives error:This works as expected with v7.1.0.
The text was updated successfully, but these errors were encountered: