Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm provider fails when executed as a daemon #455

Open
vchepkov opened this issue Mar 23, 2022 · 1 comment
Open

npm provider fails when executed as a daemon #455

vchepkov opened this issue Mar 23, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@vchepkov
Copy link

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

@vchepkov
Copy link
Author

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

@kenyon kenyon added the bug Something isn't working label Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants