1
00:00:00,600 --> 00:00:08,520
In a previous lecture in this course, you learned how to upgrade your node raid server version to the

2
00:00:08,520 --> 00:00:10,470
latest available version.

3
00:00:10,950 --> 00:00:18,390
In this lecture, I'll show you how to do the same for the underlying Node.js server on which no threat

4
00:00:18,660 --> 00:00:19,290
is based.

5
00:00:19,800 --> 00:00:27,180
You can see here that I've looked into my note read save on my Raspberry Pi inside the node red directory

6
00:00:27,180 --> 00:00:35,130
where node radius installed and have used the command node minus V to get the current version of Node.js

7
00:00:35,400 --> 00:00:38,340
on which my node installation is running.

8
00:00:38,760 --> 00:00:43,260
And as you can see, it's version 16.1 5.0.

9
00:00:43,980 --> 00:00:51,900
If I go on to the Node.js website and have a look at the latest available version, I can see that the

10
00:00:51,900 --> 00:00:57,510
stable version or the long time service revision is 16.15 point one.

11
00:00:57,900 --> 00:01:00,810
So there is a minor update to the package.

12
00:01:01,260 --> 00:01:06,990
There's also the the current latest version, which is at 18 .3.0.

13
00:01:07,380 --> 00:01:14,190
I tend to prefer to go with the ltz versions rather than the latest available version for stability

14
00:01:14,190 --> 00:01:14,670
reasons.

15
00:01:14,670 --> 00:01:21,420
And typically I don't need to have access to the bleeding edge features of Node s.

16
00:01:22,570 --> 00:01:26,900
Another thing that I want to mention here in relation to the relation between the versions of note rate

17
00:01:26,950 --> 00:01:33,250
and note, J.S. is here in the release plan on the note rate website.

18
00:01:33,760 --> 00:01:33,980
All right.

19
00:01:34,000 --> 00:01:39,940
Just go to the great dot org about releases this link right here and you can see what the plan is going

20
00:01:39,940 --> 00:01:45,630
ahead and recording this around here in June 2022.

21
00:01:45,640 --> 00:01:51,520
And you can see that the current version of note rate, the latest version is 3.0, even though I'm

22
00:01:51,520 --> 00:01:54,760
running 2.2 in this example.

23
00:01:55,120 --> 00:02:03,370
But you can see that the supported versions of note on note 12 in maintenance mode, note 14 also in

24
00:02:03,370 --> 00:02:11,410
maintenance mode and to note 16 which is in active mode and note 16 will be in active mode up to later

25
00:02:11,500 --> 00:02:12,280
this year.

26
00:02:13,060 --> 00:02:18,670
Having a look at my running version of note read, just go in here.

27
00:02:19,030 --> 00:02:20,770
You can see did version 2.2.

28
00:02:21,070 --> 00:02:24,250
So I should probably upgrade to version three at some point soon.

29
00:02:25,180 --> 00:02:25,570
All right.

30
00:02:25,570 --> 00:02:35,530
So there's a few different ways by which I can go ahead and do the upgrade of the Note J.S. installation

31
00:02:35,530 --> 00:02:36,700
on my Raspberry Pi.

32
00:02:37,210 --> 00:02:45,130
But the method that I prefer is via is by using the NPM package manager, and there's a particular package

33
00:02:45,130 --> 00:02:52,420
in here called in which allows me to interactively manage my Node.js version, try out a few other methods

34
00:02:52,420 --> 00:02:52,750
as well.

35
00:02:52,750 --> 00:02:59,020
But I find that the NPN and version, the interactive manager for Node.js, is the easiest and most

36
00:02:59,020 --> 00:03:00,040
reliable method.

37
00:03:00,460 --> 00:03:04,120
So that's what I'm going to use in this example, in this lecture.

38
00:03:04,960 --> 00:03:15,010
So I've already ran the node of the command to get the current version of Node J.S. and it's 16.1 5.0.

39
00:03:15,970 --> 00:03:26,650
The next thing that I'll do is I'll clear the NPM cache and do that using NPM cache clean and F is for

40
00:03:26,680 --> 00:03:27,250
force.

41
00:03:28,030 --> 00:03:29,800
That's going to clear the cache.

42
00:03:31,790 --> 00:03:37,160
And just note that I'm doing all this work inside the don't know to read directory.

43
00:03:37,820 --> 00:03:38,150
All right.

44
00:03:38,160 --> 00:03:38,840
And that's done.

45
00:03:39,230 --> 00:03:44,210
Now, I've already done this earlier, but in case you haven't done it, you need to go ahead and install

46
00:03:44,210 --> 00:03:51,710
the end package or the the note version manager, then do that using NPM install.

47
00:03:56,450 --> 00:04:00,170
G and you find a command for that and.

48
00:04:02,690 --> 00:04:03,370
They're right here.

49
00:04:05,540 --> 00:04:06,800
And that's going to instill in.

50
00:04:12,760 --> 00:04:13,140
Okay.

51
00:04:13,150 --> 00:04:19,450
And the reason that I got the error messages is that I actually need to use pseudo in order to run this

52
00:04:19,450 --> 00:04:20,830
command as a super user.

53
00:04:21,460 --> 00:04:24,280
So I'm going to clear this and try again with pseudo.

54
00:04:25,780 --> 00:04:27,040
And p m.

55
00:04:30,150 --> 00:04:30,930
Install.

56
00:04:32,880 --> 00:04:34,260
G and.

57
00:04:46,140 --> 00:04:46,590
Okay.

58
00:04:47,520 --> 00:04:48,090
Well done.

59
00:04:49,870 --> 00:04:57,940
And you can see I already had version 8.25.5 installed and what I've just done upgraded my end package

60
00:04:58,510 --> 00:05:00,970
to eight point 12.1.

61
00:05:01,510 --> 00:05:05,830
Now that I've got an installed, I can go ahead and upgrade.

62
00:05:06,790 --> 00:05:09,360
Note to the latest version.

63
00:05:09,440 --> 00:05:14,290
So I said I'm going to go for the latest stable version, which this version right here.

64
00:05:14,860 --> 00:05:24,550
So the command for that is sudo and use the end package manager to install the stable version of new

65
00:05:24,550 --> 00:05:25,270
to chase.

66
00:05:27,840 --> 00:05:28,950
And run his command.

67
00:05:30,080 --> 00:05:33,830
You can see that he picked Vision 16.2, 15.1.

68
00:05:33,890 --> 00:05:38,480
The latest available LTE version and it's continuing with the installation.

69
00:05:40,490 --> 00:05:40,790
Okay.

70
00:05:40,790 --> 00:05:44,430
So it's completed with the installation notes.

71
00:05:44,450 --> 00:05:46,160
Have a look at the current version.

72
00:05:46,160 --> 00:05:51,980
Again, I'm going to use the command node V just like before.

73
00:05:52,610 --> 00:05:56,570
And you can see they're just showing me 16.15 point one.

74
00:05:56,900 --> 00:06:05,870
If in your case is showing the old version of a node J.S., then use the hash command goes like this

75
00:06:06,080 --> 00:06:10,330
hash to basically rehash Node.js.

76
00:06:10,330 --> 00:06:16,280
J.S. And then run note the again and it will show you the correct current version of note.

77
00:06:17,130 --> 00:06:23,960
Now, another thing that I should show you before we go on and restart Node, read this in case you

78
00:06:23,960 --> 00:06:30,950
want to go for a newer version of for the latest version of Node.js.

79
00:06:31,220 --> 00:06:40,360
What you can do is to use the end command again and install the latest version of Node.js.

80
00:06:40,370 --> 00:06:44,870
In this case, it would go for version 18 .3.0.

81
00:06:44,900 --> 00:06:51,680
Not going to do that, of course, now, or if you want to be specific about which version of Node she'd

82
00:06:51,680 --> 00:06:57,920
like to install, then instead of stable or latest, you can just be specific and say I'd like to install

83
00:06:57,920 --> 00:07:07,400
version say 18 .3.3 and then the end vision manager will install the specific version of note that you

84
00:07:07,400 --> 00:07:08,120
have requested.

85
00:07:09,470 --> 00:07:09,770
All right.

86
00:07:09,770 --> 00:07:14,630
So the upgrade of Node.js is now finished.

87
00:07:15,140 --> 00:07:19,010
For this change to take effect in node red, you need to restart it.

88
00:07:19,010 --> 00:07:28,670
So the way you do this is first I stop node red to say Node stop and then start it.

89
00:07:31,930 --> 00:07:32,970
Know, Rich start.

90
00:07:35,810 --> 00:07:36,920
Give it a moment to spin up.

91
00:07:44,350 --> 00:07:53,110
And you see here that the note James version, that note read is using is six point 15.1, which I just

92
00:07:53,860 --> 00:07:54,550
installed.

93
00:07:55,490 --> 00:07:56,780
And just kind of refresh.

94
00:07:57,940 --> 00:07:58,170
Okay.

95
00:07:58,190 --> 00:07:58,980
It's not ready yet.

96
00:08:03,780 --> 00:08:05,970
I'm waiting for the dashboard to start as well.

97
00:08:06,000 --> 00:08:07,290
After the polite notes.

98
00:08:11,110 --> 00:08:11,680
All right.

99
00:08:12,590 --> 00:08:13,110
Here you go.

100
00:08:13,190 --> 00:08:14,390
And that should work now.

101
00:08:18,550 --> 00:08:20,040
And don't release back up.

102
00:08:23,750 --> 00:08:30,650
And that's how you can upgrade the version of Node.js used by trade.
