puppet-nodejs
puppet-nodejs copied to clipboard
npm provider fails when executed as a daemon
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 6.26.0
- Ruby: ruby 2.5.9p229
- Distribution: Rocky
- Module version: 9.0.1
How to reproduce (e.g Puppet code you use)
Error occurs when provider is instantiated
What are you seeing
Mar 23 19:40:11 web201 puppet-agent[1488784]: Could not prefetch package provider 'npm': invalid byte sequence in US-ASCII
Mar 23 19:40:11 web201 puppet-agent[1488784]: Failed to apply catalog: invalid byte sequence in US-ASCII
Any additional information you'd like to impart
provider works with no issues with puppet agent -t command from a command line session,
I presume while running as a daemon some environment variable, which provider uses, is missing
It seems provider requires LANG variable to be set
# env -i puppet agent -t
Info: Applying configuration version 'c78cfbcf'
Error: Could not prefetch package provider 'npm': invalid byte sequence in US-ASCII
Error: Failed to apply catalog: invalid byte sequence in US-ASCII
# env -i LANG=en_US.UTF-8 puppet agent -t
Info: Applying configuration version 'c78cfbcf'
Notice: Applied catalog in 17.17 seconds