master
Gitcub / setup-notes.txt
After uninstalling the native versions of nodejs and npm from debian 10, I installed nodejs 16.14.0 thus:

cd ~
curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install -y nodejs

From the project directory I initialized the project and installed express.js and pug using a special option to avoid a stupid error:

npm init
npm install express --no-bin-links
npm install pug --no-bin-links

At this point I moved this directory from my nas to 'Desktop'. The nas may have been responsible for the bin-linking error above.

I then setup sqlite; the then current npm package required an audit fix, resulting in its downgrade to 4.2.0:

sudo apt install sqlite3
npm install sqlite3
npm audit fix --force

I then installed next.js and turned off its sickening telemetry anti-feature:

npm install next react react-dom
npx next telemetry disable

I then installed nodegit, which unfortunately required a seperate package:

sudo apt-get install libkrb5-dev
npm install nodegit

I then installed and initialized tailwind css:

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

I then installed highlight.js:

npm install highlight.js
npm audit fix --force

React icons:

npm install react-icons

React markdown and remark gfm:

npm install react-markdown
npm install remark-gfm

At this point, I encountered some serious app crashing errors including segmentation faults and the following:

    #
    # Fatal error in , line 0
    # unreachable code
    #
    #
    #
    #FailureMessage Object: 0x7f07148347f0
    1: 0xb77051  [node]


    #
    # Fatal error in , line 0
    # unreachable code
    #
    #
    #
    #FailureMessage Object: 0x7fff56148ac0
    2: 0x1c0a9b4 V8_Fatal(char const*, ...) [node]
    1: 0xb77051  [node]
    3: 0xe727c3 v8::internal::ConcurrentMarking::Run(v8::JobDelegate*, v8::base::EnumSet<v8::internal::CodeFlushMode, int>, unsigned int, bool) [node]
    2: 0x1c0a9b4 V8_Fatal(char const*, ...) [node]
    4: 0xe72d87 v8::internal::ConcurrentMarking::JobTask::Run(v8::JobDelegate*) [node]
    3: 0xef0f06 std::pair<unsigned long, unsigned long> v8::internal::MarkCompactCollector::ProcessMarkingWorklist<(v8::internal::MarkCompactCollector::MarkingWorklistProcessingMode)0>(unsigned long) [node]
    5: 0x18e6ff4 v8::platform::DefaultJobWorker::Run() [node]
    4: 0xef5af4 v8::internal::MarkCompactCollector::MarkLiveObjects() [node]
    6: 0xb771f5  [node]
    5: 0xefed58 v8::internal::MarkCompactCollector::CollectGarbage() [node]
    7: 0x7f0715a05fa3  [/lib/x86_64-linux-gnu/libpthread.so.0]
    6: 0xebf519 v8::internal::Heap::MarkCompact() [node]
    8: 0x7f0715936eff clone [/lib/x86_64-linux-gnu/libc.so.6]
    Trace/breakpoint trap

I rebuilt the .node binaries, which appeared to solve the problem:

npm rebuild

Installed segfault handler:

npm install segfault-handler

Installed tailwind typography plugin:

npm install -D @tailwindcss/typography

uninstalled pug:

npm uninstall pug

On deployment system
====================

deployed on digital ocean droplet with nodejs distro (ubuntu 20), minimum 2GB ram used to prevent installation from being killed

installed libkrb5-dev, libssl-dev, krb5-config, libpcre3-dev and build-essential in order for nodegit to install

installed python2.7 for segfault-handler to install:

apt install python2.7
ln -s /usr/bin/python2.7 /usr/bin/python

then sqlite3 wouldn't install; I removed package-lock.json and the entire installation worked; perhaps all that was needed?

pm2 command for running:

pm2 start npm --name "gitcub" -- start
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118