kolbytn / mindcraft

MIT License
1.77k stars 221 forks source link

protocolVersions.json doesn't generate #151

Open Amethyst222 opened 2 months ago

Amethyst222 commented 2 months ago

I have done the steps in the README, and everything is generated, but when I tried to run 'node main.js', I got this error:

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

Error: Cannot find module './minecraft-data/data/pc/common/protocolVersions.json'
Require stack:
- C:\Users\Ame\Documents\GitHub\mindcraft\node_modules\minecraft-data\index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (C:\Users\Ame\Documents\GitHub\mindcraft\node_modules\minecraft-data\index.js:5:7)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)
    at cjsLoader (node:internal/modules/esm/translators:348:17) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\Ame\\Documents\\GitHub\\mindcraft\\node_modules\\minecraft-data\\index.js'
  ]
}

I checked the actual folder path and I find that it hasn't even generated, If someone could tell me what is supposed to be in protocolVersions.json so I can manually add it that would be great,

Amethyst222 commented 2 months ago

Actually its much bigger than that, after more troubleshooting, the entire minecraft data files are completely messed up, missing so many files

kolbytn commented 2 months ago

You ran npm install at it concluded without errors? It looks like mineflayer wasn't fully installed.