-
Notifications
You must be signed in to change notification settings - Fork 54
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
chore(nodejs): exit installation if Node.js version is unsupported #1010
Conversation
2c9302d
to
4ed95ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this on an EC2 instance with node 14 and 16 managed via nvm and a test app running via pm2. I locally compiled newrelic-cli using the code from this branch and ran the following install script:
curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=NRAK-**** NEW_RELIC_ACCOUNT_ID=**** NEW_RELIC_CLI_SKIP_CORE=1 ./newrelic install -n node-agent-installer --debug
Node 14
Expected behavior:
Script should fail with error "Node.js version not supported [...]"
Actual behavior:
🔴 Script shows node agent as "Installed" but the entity does not show up in NR UI under All Entities view.
🔴 Debug output shows errors in the preInstall
commands:
DEBUG "node": executable file not found in $PATH
DEBUG "node": executable file not found in $PATH
DEBUG 7:4: not a valid test operator: 16
DEBUG 7:4: not a valid test operator: 16
DEBUG 7:4: 16 must be followed by a word
DEBUG 7:4: 16 must be followed by a word
Node 16
Expected behavior:
Script should show Node agent as installed
Actual Behavior:
✅ Script shows Node agent as installed.
🟡 Debug output shows errors in the preInstall
commands (same as above).
A possible problem here is that the install script is run with sudo and node/nvm might not be on the secure path.
4ed95ac
to
c93bf2c
Compare
Should be working now after my recent changes. Let me know if you run into anymore issues. Thanks! |
Confirm this is working to the extent it can and is low risk.
No description provided.