zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
26.09k stars 1.78k forks source link

(Bug report) #4746

Closed AlexeiKharchev closed 2 months ago

AlexeiKharchev commented 2 months ago

Trilium Version

0.63.5_amd64

What operating system are you using?

Ubuntu

What is your setup?

Local (no sync)

Operating System Version

Linux Mint

Description

I have installed trilium from downloaded trilium_0.63.5_amd64.deb but I cannot be launched from Apps menu

so here command line errors listed: alexei@Aspire:~$ trilium A JavaScript error occurred in the main process Uncaught Exception: Error: Cannot find module 'cls-hooked' Require stack:

libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed

Error logs

No response

AlexeiKharchev commented 2 months ago

my system is laptop without videocard my_system.txt

Nriver commented 2 months ago

You should run the server version.

AlexeiKharchev commented 2 months ago

$ wget https://github.com/zadam/trilium/releases/download/v0.63.5/trilium-linux-x64-server-0.63.5.tar.xz $ tar xf trilium-linux-x64-server-0.63.5.tar.xz $ cd trilium-linux-x64-server/ $ npm install ... some npm warns ... postinstall was done, but there is a problem while trilium prepare with husky

trilium@0.63.5 prepare husky install || echo 'Husky install failed, expected on flatpak build' log1.log

$ npm run start-server here my app crached

$ trilium@0.63.5 start-server

cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/www.js

[nodemon] 3.0.1 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,cjs,json [nodemon] starting node src/www.js Generated session secret /mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/bindings/bindings.js:121 throw e; ^

Error: The module '/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/better-sqlite3/build/Release/better_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 108. This version of Node.js requires NODE_MODULE_VERSION 120. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install). at Module._extensions..node (node:internal/modules/cjs/loader:1475:18) at Module.load (node:internal/modules/cjs/loader:1212:32) at Module._load (node:internal/modules/cjs/loader:1028:12) at Module.require (node:internal/modules/cjs/loader:1237:19) at require (node:internal/modules/helpers:176:18) at bindings (/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/bindings/bindings.js:112:48) at new Database (/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/better-sqlite3/lib/database.js:48:64) at Object. (/mnt/Git/apt-build/build/trilium-linux-x64-server/src/services/sql.js:13:22) at Module._compile (node:internal/modules/cjs/loader:1378:14) at Module._extensions..js (node:internal/modules/cjs/loader:1437:10) { code: 'ERR_DLOPEN_FAILED' }

Node.js v21.6.2 [nodemon] app crashed - waiting for file changes before starting

AlexeiKharchev commented 2 months ago

trying to reinstall better_sqlite3.nod rm -r node_modules rm package-lock.json npm i cheerio npm i html2plaintext up to date, audited 1367 packages in 19s

239 packages are looking for funding run npm fund for details

16 vulnerabilities (13 moderate, 3 high)

$npm audit npm_audit.log

after that git clone git@github.com:zadam/trilium and copying .git directory into trilium-x64-linux-server solver husky problem

AlexeiKharchev commented 2 months ago

$npm run start-server yeah, server started, but ... DB not initialized, please visit setup page - http://[your-server-host]:8080 to see instructions on how to initialize Trilium.

I open http:/localhost:8080/setup and see ... Nothing

alexei@Aspire:~/build/trilium-linux-x64-server$ npm run start-server

trilium@0.63.5 start-server cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/www.js

[nodemon] 3.0.1 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,cjs,json [nodemon] starting node src/www.js DB not initialized, please visit setup page - http://[your-server-host]:8080 to see instructions on how to initialize Trilium. DB size: 4 KB { "appVersion": "0.63.5", "dbVersion": 228, "nodeVersion": "v21.6.2", "syncVersion": 32, "buildDate": "2024-03-28T07:11:39+01:00", "buildRevision": "399458b52f250b22be22d980a78de0b3390d7521", "dataDirectory": "./data", "clipperProtocolVersion": "1.0", "utcDateTime": "2024-04-21T04:48:04.224Z" } CPU model: Intel(R) Pentium(R) CPU N3700 @ 1.60GHz, logical cores: 4 freq: 2400 Mhz Trusted reverse proxy: false App HTTP server starting up at port 8080 (node:34494) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) Listening on port 8080 Sending message to all clients: {"type":"reload-frontend","reason":"source code change"} Error: Router not found for request GET /assets/v0.63.5/app/setup.js at /mnt/Git/apt-build/build/trilium-linux-x64-server/src/routes/error_handlers.js:18:21 at Layer.handle [as handle_request] (/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/express/lib/router/index.js:328:13) at /mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/express/lib/router/index.js:346:12) at next (/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/express/lib/router/index.js:280:10) at Layer.handle [as handle_request] (/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/express/lib/router/layer.js:91:12) at trim_prefix (/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/express/lib/router/index.js:328:13) at /mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/express/lib/router/index.js:346:12) { status: 404 } ... the same string

AlexeiKharchev commented 2 months ago

You should run the server version.

I ran server, but my Trilium is still unitialized page http://localhost:8080/setup is blank!

Nriver commented 2 months ago

You do not need to do that. Just download, extract and run trilium.sh

AlexeiKharchev commented 2 months ago

You do not need to do that. Just download, extract and run trilium.sh

I have trouble with NODE_MODULE_VERSION 120. Is this article right decision? https://dev.to/foxgem/troubleshooting-compiled-against-a-different-node-version-2alf

no, the problem is node_modules/better-sqlite3/build/config.gypi has line "node_module_version": 120,

I have updated nodejs to v21.7.3 but problem running . trilium.sh is not solved

Error: The module '/mnt/Git/apt-build/build/trilium-linux-x64-server/node_modules/better-sqlite3/build/Release/better_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 120. This version of Node.js requires NODE_MODULE_VERSION 108. Please try re-compiling or re-installing

AlexeiKharchev commented 2 months ago

I can't understand about a year, what the problem was with my actions Several times I downloaded current release(not sources), because I didn't want to have deal with electron, nodejs and dependencies and tried to start it Even I believe, that I have problems with laptop' cpu (cause message about 48bit ... in kernel)

today I downloaded release trilium-linux-x64-server-0.63.5.tar.xz there was no .git directory and I have got problems with husky install message But after I copied .git from git sources, I had another problems:

  1. $npm run start-server started, but I had a blank page http://localhost:8080/setup
  2. running . trilium.sh exit with error with better-sqlite3 module - it can run with NODE_MODULE_VERSION 120 only, thought I tried to update nodejs up to v21.7.3, several times deleted node_modules, package.json.lock, added lines to package.json' "scripts" section: "rebuild": "electron-rebuild -f -w better-sqlite3", "postinstall": "electron-builder install-app-deps" and tried to npm install, npm rebuild, even edit node_modules/better-sqlite3/build/config.gypi without any success

Decision is: git clone git@github.com:zadam/trilium npm i cheerio - several times I had problems with cheerio depedency of html2plaintext npm install npm run start-server