standardnotes / syncing-server-js

The Standard Notes server. For self-hosting, use https://github.com/standardnotes/standalone
GNU Affero General Public License v3.0
70 stars 15 forks source link

Error starting on MacOS (Unable to compile TypeScript) #104

Closed jonhadfield closed 2 years ago

jonhadfield commented 2 years ago

Log excerpt below. This is running from a clone and then running ./server.sh setup followed by ./server.sh start. This is from commit 84e29f9. Docker version 20.10.11, build dea9396 Docker Compose version v2.2.1 MacOS 12.0.1 (21A559)

syncing-server-js_1         | db (172.18.0.8:3306) open
syncing-server-js_1         | db:3306 is up - executing command
syncing-server-js_1         | cache (172.18.0.5:6379) open
syncing-server-js_1         | cache:6379 is up - executing command
syncing-server-js_1         | Starting Web in Local Mode...
syncing-server-js_1         | yarn run v1.22.15
syncing-server-js_1         | $ npx nodemon -L bin/server.ts
syncing-server-js_1         | npm WARN exec The following package was not found and will be installed: nodemon
syncing-server-js_1         | [nodemon] 2.0.15
syncing-server-js_1         | [nodemon] to restart at any time, enter `rs`
syncing-server-js_1         | [nodemon] watching path(s): src/**/* bin/**/*
syncing-server-js_1         | [nodemon] watching extensions: ts,json
syncing-server-js_1         | [nodemon] starting `npx ts-node bin/server.ts`
syncing-server-js_1         | npm WARN exec The following package was not found and will be installed: ts-node
syncing-server-js_1         | /home/syncingserver/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:750
syncing-server-js_1         |     return new TSError(diagnosticText, diagnosticCodes);
syncing-server-js_1         |            ^
syncing-server-js_1         | TSError: ⨯ Unable to compile TypeScript:
syncing-server-js_1         | error TS5083: Cannot read file '/var/www/node_modules/@standardnotes/config/src/tsconfig.json'.
syncing-server-js_1         |
syncing-server-js_1         |     at createTSError (/home/syncingserver/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:750:12)
syncing-server-js_1         |     at reportTSError (/home/syncingserver/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:754:19)
syncing-server-js_1         |     at create (/home/syncingserver/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:765:36)
syncing-server-js_1         |     at register (/home/syncingserver/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:514:15)
syncing-server-js_1         |     at main (/home/syncingserver/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/bin.ts:250:27)
syncing-server-js_1         |     at Object.<anonymous> (/home/syncingserver/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/bin.ts:482:3)
syncing-server-js_1         |     at Module._compile (node:internal/modules/cjs/loader:1101:14)
syncing-server-js_1         |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
syncing-server-js_1         |     at Module.load (node:internal/modules/cjs/loader:981:32)
syncing-server-js_1         |     at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
syncing-server-js_1         |   diagnosticText: "error TS5083: Cannot read file '/var/www/node_modules/@standardnotes/config/src/tsconfig.json'.\n",
syncing-server-js_1         |   diagnosticCodes: [ 5083 ]
syncing-server-js_1         | }
syncing-server-js_1         | [nodemon] app crashed - waiting for file changes before starting...
karolsojko commented 2 years ago

@jonhadfield a side topic: do you have in mind contributing to syncing-server-js? If not, then what you'll want to set up locally for self-hosting purposes is https://github.com/standardnotes/standalone

karolsojko commented 2 years ago

Here's some docs to get you started if that's the case: https://docs.standardnotes.com/self-hosting/getting-started

jonhadfield commented 2 years ago

Thanks @karolsojko. I do have it running on a linux box using standalone, but wanted it running locally, on my mac, for when I'm not at home and want to work on my app that uses SN. I think I got lost between repos and raised this in error.
Anyhow, mac issue sorted, so will close.