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
Improved handling of node installation (& miscellaneous improvements) (#1419)
* fix: Remove edison nodesource installation
* fix: npm upgrade to latest *compatible* version, not the literal latest
The previous command (which installs npm@latest) results in the installation
of a version of npm which is almost certainly incompatible with the installed
(regardless of source) version of nodejs
* fix: Use n instead of apt for installing node & npm
* fix: Improve node execution time check function
- Remove what should be a redundant install, instead opt to fail if node is missing.
Given that openaps-packages.sh handles installing node, this failing check indicates
an unmitigated failure in the process previously, so let's not continue and make things
potentially worse.
- Attempt to remove existing nodejs/npm packages using apt
- Warn the user if versions of node and npm remain
- Switch nvm for n, using installed version of n if available
Else, bootstrap install n as done elsewhere.
* fix: Replace broken grep statements
die "No version of node (>=8,<=19) was found, which is an unexpected error (node installation should have been handled by previous installation steps)"
303
300
fi
304
301
305
302
# Check that the nodejs you have installed is not broken. In particular, we're
@@ -314,17 +311,39 @@ function install_or_upgrade_nodejs () {
314
311
echo"Your installed nodejs ($(node --version)) is very slow to start (took ${NODE_EXECUTION_TIME}s)"
315
312
echo"This is a known problem with certain versions of Raspberry Pi OS."
316
313
317
-
if prompt_yn "Install a new nodejs version using nvm?" Y;then
318
-
echo"Installing nvm and using it to replace the system-provided nodejs"
0 commit comments