sarsamurmu / anki-offline-sync

This repository demonstrates how you can use Anki's own sync server to sync data between a computer and a phone
6 stars 0 forks source link

error help #3

Open CelestialRose101 opened 1 month ago

CelestialRose101 commented 1 month ago

Error: Command failed: /Applications/Anki.app/Contents/MacOS/anki --syncserver

at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at ChildProcess.exithandler (node:child_process:421:12)
at ChildProcess.emit (node:events:520:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {

code: 1, killed: false, signal: null, cmd: '/Applications/Anki.app/Contents/MacOS/anki --syncserver' } Anki starting... Sync server failed: unable to create server

Caused by these errors (recent errors listed first): 1: opening media 2: open media db (code=500) 3: DbError * 4: Locked:

NOTE: Some redundant information has been removed from the lines marked with *. Set SNAFU_RAW_ERROR_MESSAGES=1 to disable this behavior.

CelestialRose101 commented 1 month ago

ALSO THIS:

(I get both these errors when I put in node . node:internal/modules/cjs/loader:1189 throw err; ^

Error: Cannot find module '/Users/celestialrose' at Module._resolveFilename (node:internal/modules/cjs/loader:1186:15) at Module._load (node:internal/modules/cjs/loader:1012:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:12) at node:internal/main/run_main_module:30:49 { code: 'MODULE_NOT_FOUND', requireStack: []

sarsamurmu commented 4 weeks ago

Make sure you're running the command in the folder/directory where the index.js is placed

CelestialRose101 commented 3 weeks ago

yes i am, i still get the error

On Sun, Jun 2, 2024 at 2:45 PM Sarsa Murmu @.***> wrote:

Make sure you're running the command in the folder/directory where the index.js is placed

— Reply to this email directly, view it on GitHub https://github.com/sarsamurmu/anki-offline-sync/issues/3#issuecomment-2143983099, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFP3OEBDZYVZRO4L6EAK5PLZFNR6BAVCNFSM6AAAAABIPWFMB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTHE4DGMBZHE . You are receiving this because you authored the thread.Message ID: @.***>

sarsamurmu commented 3 weeks ago

Can you share your index.js file?

CelestialRose101 commented 3 weeks ago

Removed confidential information

const httpProxy = require('http-proxy') const childProcess = require('child_process')

const ANKI_PATH = '/Applications/Anki.app/Contents/MacOS/anki' const HOST = '0.0.0.0' const PORT = 27701 const USER = ''

childProcess.execFile(ANKI_PATH, ['--syncserver'], { env: { SYNC_HOST: '127.0.0.1', SYNC_PORT: PORT, SYNC_USER1: USER, MAX_SYNC_PAYLOAD_MEGS: 100, } }, (error, stdout, stderr) => { console.log(error); console.log(stdout); console.log(stderr); })

if (HOST) { httpProxy .createProxyServer({ target: http://127.0.0.1:${PORT} }) .listen(PORT, HOST)

console.log(Proxy to sync-server has been created: http:// ${HOST}:${PORT}) }

On Mon, Jun 3, 2024 at 2:42 PM Sarsa Murmu @.***> wrote:

Can you share your index.js file?

— Reply to this email directly, view it on GitHub https://github.com/sarsamurmu/anki-offline-sync/issues/3#issuecomment-2145885183, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFP3OECFZJ4TUL2UL4C7KZDZFS2KBAVCNFSM6AAAAABIPWFMB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVHA4DKMJYGM . You are receiving this because you authored the thread.Message ID: @.***>

CelestialRose101 commented 2 weeks ago

hello?

On Thu, Jun 6, 2024 at 2:06 AM neelege grant @.***> wrote:

Removed confidential information

const httpProxy = require('http-proxy') const childProcess = require('child_process')

const ANKI_PATH = '/Applications/Anki.app/Contents/MacOS/anki' const HOST = '0.0.0.0' const PORT = 27701 const USER = ''

childProcess.execFile(ANKI_PATH, ['--syncserver'], { env: { SYNC_HOST: '127.0.0.1', SYNC_PORT: PORT, SYNC_USER1: USER, MAX_SYNC_PAYLOAD_MEGS: 100, } }, (error, stdout, stderr) => { console.log(error); console.log(stdout); console.log(stderr); })

if (HOST) { httpProxy .createProxyServer({ target: http://127.0.0.1:${PORT} }) .listen(PORT, HOST)

console.log(Proxy to sync-server has been created: http:// ${HOST}:${PORT}) }

On Mon, Jun 3, 2024 at 2:42 PM Sarsa Murmu @.***> wrote:

Can you share your index.js file?

— Reply to this email directly, view it on GitHub https://github.com/sarsamurmu/anki-offline-sync/issues/3#issuecomment-2145885183, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFP3OECFZJ4TUL2UL4C7KZDZFS2KBAVCNFSM6AAAAABIPWFMB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVHA4DKMJYGM . You are receiving this because you authored the thread.Message ID: @.***>