Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install #6

Open
Vittelius opened this issue Aug 14, 2023 · 3 comments
Open

Unable to install #6

Vittelius opened this issue Aug 14, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Vittelius
Copy link

I'm unable to setup the bot. When I run node main.js I get the following error:

~/Lemmy-Mega-Bot/main.js:1
import LemmyBot from 'lemmy-bot';
       ^^^^^^^^

SyntaxError: Unexpected identifier
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

@Vittelius
Copy link
Author

I've solved the problem. Turns out I was running an outdated version of node.js. But after upgrading to node 20.5.1 I'm getting new error messages:

node:internal/modules/cjs/loader:1048
  const err = new Error(message);
              ^

Error: Cannot find module '~/Lemmy-Mega-Bot-2.1.0/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-x64/node_sqlite3.node'
Require stack:
- ~/Lemmy-Mega-Bot-2.1.0/node_modules/sqlite3/lib/sqlite3-binding.js
- ~/Lemmy-Mega-Bot-2.1.0/node_modules/sqlite3/lib/sqlite3.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (~/Lemmy-Mega-Bot-2.1.0/node_modules/sqlite3/lib/sqlite3-binding.js:4:17)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '~/Lemmy-Mega-Bot-2.1.0/node_modules/sqlite3/lib/sqlite3-binding.js',
    '~/Lemmy-Mega-Bot-2.1.0/node_modules/sqlite3/lib/sqlite3.js'
  ]
}

I've checked sqlite3 is installed

@mjpc13
Copy link
Contributor

mjpc13 commented Aug 15, 2023

If you want, you can use Docker, check this PR and you won't have these dependencies problems.

@Ategon
Copy link
Collaborator

Ategon commented Aug 15, 2023

Weird, I can check it out in maybe around a week, 2 weeks. Ive been using somewhere around node version 18

@Ategon Ategon added the bug Something isn't working label Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants