2based2wait icon indicating copy to clipboard operation
2based2wait copied to clipboard

Cannot find module 'prismarine-chat'

Open 2b2tplayer opened this issue 1 year ago • 7 comments

Error: Cannot find module 'prismarine-chat' Require stack:

  • C:\Users[redacted]\Desktop\proxies\2based2wait\util\chatty.js
  • C:\Users[redacted]\Desktop\proxies\2based2wait\proxy.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15) at Function.Module._load (node:internal/modules/cjs/loader:833:27) at Module.require (node:internal/modules/cjs/loader:1057:19) at require (node:internal/modules/cjs/helpers:103:18) at Object. (C:\Users[redacted]\Desktop\proxies\2based2wait\util\chatty.js:11:21) at Module._compile (node:internal/modules/cjs/loader:1155:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10) at Module.load (node:internal/modules/cjs/loader:1033:32) at Function.Module._load (node:internal/modules/cjs/loader:868:12) at Module.require (node:internal/modules/cjs/loader:1057:19) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\[redacted]\Desktop\proxies\2based2wait\util\chatty.js', 'C:\Users\[redacted]\Desktop\proxies\2based2wait\proxy.js'

2b2tplayer avatar Apr 25 '23 16:04 2b2tplayer

same issue, was trying to run under docker:

FROM node:16
COPY . /2based2wait
RUN npm install -g pnpm
WORKDIR /2based2wait
RUN pnpm install --prod
CMD pnpm start
# docker run --rm -it -p $port:$port -v "$PWD/2b2w.config.json":"/2based2wait/config.json" 2b2w
Error: Cannot find module 'prismarine-chat'
Require stack:
- /2based2wait/util/chatty.js
- /2based2wait/proxy.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
    at Function.Module._load (node:internal/modules/cjs/loader:871:27)
    at Module.require (node:internal/modules/cjs/loader:1098:19)
    at require (node:internal/modules/cjs/helpers:108:18)
    at Object.<anonymous> (/2based2wait/util/chatty.js:11:21)
    at Module._compile (node:internal/modules/cjs/loader:1196:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
    at Module.load (node:internal/modules/cjs/loader:1074:32)
    at Function.Module._load (node:internal/modules/cjs/loader:909:12)
    at Module.require (node:internal/modules/cjs/loader:1098:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/2based2wait/util/chatty.js', '/2based2wait/proxy.js' ]
}
 ELIFECYCLE  Command failed with exit code 1.

Kimapr avatar Apr 29 '23 03:04 Kimapr

Looks like some sub-dependencies that are actually dependencies are not specified

pnpm install --prod --shamefully-hoist

seems to fix (shamefully)

Kimapr avatar Apr 29 '23 04:04 Kimapr

Ah, this issue was fixed in main a while back, there just hasn't been a new release in a while. Additionally, v1.0.4 was released before we changed to pnpm, so the current instructions are a little misleading. The installation instructions in v1.0.4's README should be accurate to v1.0.4, as lots has changed in the past few months, sorry about that.

Obvious solution is to just keep main on the latest stable release and have a separate dev branch; or release v1.0.5 in its current state and do a scream test (lol). I'm still undecided.

Anyways, doing—

pnpm install --prod --shamefully-hoist

—or following the npm install instructions in v1.0.4 should both work; just don't mix and match different package managers and keep in mind that the next stable release will be pnpm-only.

Enchoseon avatar May 05 '23 01:05 Enchoseon

Update: If you're feeling particularly adventerous, the latest prerelease (v1.0.5-beta.2) includes proper pnpm support and dependencies (git clone https://github.com/Enchoseon/2based2wait --branch v1.0.5-beta.2 --depth 1 && cd 2based2wait), but keep in mind that it's a prerelease for a good reason.

I'll close this issue whenever main is stable enough to make a new stable release.

Enchoseon avatar May 13 '23 05:05 Enchoseon

```shell
pnpm install --prod --shamefully-hoist

I am on the latest pull and am still getting the no module for prismiraine-chat found. I ran that and it fixed the issue, but the program as a whole no longer works, when I start it (pnpm start), It never joins the server and sits on the screen forever saying "Current Queue Position: CHECKING...."

jacobjake1 avatar Jun 04 '23 15:06 jacobjake1

Update...It connects to the server but it still never updates via cmd it just sits on Checking....

Afk module doesn't seem to work cause I got kicked at 12 minutes

jacobjake1 avatar Jun 06 '23 16:06 jacobjake1

I gave it a try and seems that what jacobjake1 said is true, it doesn't update the queue position and in my case, I run it in a server and it's not letting me connect to that server's ip, what I mean is that the server isn't even up

2b2tplayer avatar Jun 09 '23 05:06 2b2tplayer

Missing dep was added in v1.0.5 release.

Enchoseon avatar May 13 '24 19:05 Enchoseon