• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Issue Node environment variables not returned by process.env

basdebruin

New Pleskian
Plesk Obsidian 18.0.36 / Ubuntu 20.04.3 / Node 14.18.0

process.env.XYZ does return undefined while XYZ is set as a custom environment variable. Other variable are returned fine. Is there a maximum to the number of environment variables or the total nr of characters in them? Removing one of the working environment variables does not solve the issue, so it does not look like it runs into a maximum.
 
So Plesk doesn't forward the ENV Vars to custom scripts (don't ask me why), but this will pass them to it if you run it as part of the command:
export $(cat ./location/of/.env | xargs) && node ./index.js // or whatever command you are trying to run that has methods referencing env vars.

Hope this helps
 
So Plesk doesn't forward the ENV Vars to custom scripts (don't ask me why), but this will pass them to it if you run it as part of the command:
export $(cat ./location/of/.env | xargs) && node ./index.js // or whatever command you are trying to run that has methods referencing env vars.

Hope this helps
I had Plesk with CloudLinux on a CentOs7, and the custom environment variables worked perfectly.
Last month, however, I switched to a new system with Plesk on Ubuntu 20, and now the custom environment variables don't work anymore.
Would this be a permissions issue?
 
Back
Top