mineflayer: Installation doesnt work.

Ok. I have been trying to install the bot now for over 5 hours and it still dosn’t work. I have tryed it multiple times now but it doesn’t seem to work. Here is the log of the npm test maby it can help. http://pastebin.com/raw/2bLTtDMn

Also I tryed to use this: var mineflayer = require('mineflayer'); but it also throws this error in chrome: Uncaught ReferenceError: require is not defined

Soooo can someone help me to get it installed proerly? And not only “npm install mineflayer” because this doesn’t work…

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (15 by maintainers)

Most upvoted comments

@Kavatch rm -rf everything. Do this :

# Create the project folder. All your minecraft bot stuff will be in there
mkdir my_minecraft_bot
# Move into the project folder
cd my_minecraft_bot
# Create the necessary files for npm/nodejs to function.
# It will ask you a few questions, answer them. the defaults should be fine
npm init
# Install mineflayer. Mineflayer is a library, kind of like jquery.
npm i --save mineflayer
# Install mineflayer-navigate. This is a library as well.
npm i --save rom1504/mineflayer-navigate#update_vec3
# Write your bot's source in index.js. Here, we're downloading it from the internet
# (I fixed up your pastebin).
curl http://pastebin.com/raw/NayLXamq > index.js
# Run the bot now :D
node index.js

This is the proper way to start a nodejs project 😄.

ok so put version:"1.8.8" in createBot