Comments (15)
Which version of yarn
are you using?
from shulker.
I installed it via a package of tools using sudo apt install <package name>
that I got promted to install on the server, after it didn't recognize the command, sadly my pc crashed since and i am not sure what the package name was, but the yarn version is 0.22, figured that much out using yarn --version
command.
from shulker.
Try yarn run build && yarn run start
from shulker.
../shulker$ yarn run build && yarn run start
ERROR: [Errno 2] No such file or directory: 'run
Sadly that didn't work.
from shulker.
any other idea what I could try, or should I maybe try an older version of the tool ?
from shulker.
Can you try following the instructions here? yarnpkg/yarn#3708
You may possibly have another package installed
from shulker.
The install script has never failed me either https://classic.yarnpkg.com/en/docs/install
from shulker.
shulker$ sudo yarn build && yarn start
yarn run v1.22.4
$ tsc
src/Discord.ts:1:55 - error TS2307: Cannot find module 'discord.js'.
1 import {Client, Message, Snowflake, TextChannel} from 'discord.js'
~~~~~~~~~~~~
src/Discord.ts:3:24 - error TS2307: Cannot find module 'emoji-strip'.
3 import emojiStrip from 'emoji-strip'
~~~~~~~~~~~~~
src/Discord.ts:4:19 - error TS2307: Cannot find module 'axios'.
4 import axios from 'axios'
~~~~~~~
src/Discord.ts:32:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
32 console.log('[ERROR] Could not authenticate with Discord: ' + e)
~~~~~~~
src/Discord.ts:33:30 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
33 if (this.config.DEBUG) console.error(e)
~~~~~~~
src/Discord.ts:44:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
44 console.log(`[INFO] Found channel #${channel.name} (id: ${channel.id}) in the server "${channel.guild.name}"`)
~~~~~~~
src/Discord.ts:46:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
46 console.log(`[INFO] Could not find channel ${name}! Check that the name is correct or use the ID of the channel instead (DISCORD_CHANNEL_ID)!`)
~~~~~~~
src/Discord.ts:47:7 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node`.
47 process.exit(1)
~~~~~~~
src/Discord.ts:67:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
67 console.log('[ERROR] Could not auth with the server!')
~~~~~~~
src/Discord.ts:68:30 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
68 if (this.config.DEBUG) console.error(e)
~~~~~~~
src/Discord.ts:74:29 - error TS7006: Parameter 'r' implicitly has an 'any' type.
74 if (author.roles.find(r => this.config.SLASH_COMMAND_ROLES.includes(r.name))) {
~
src/Discord.ts:78:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
78 console.log('[INFO] User attempted a slash command without a role')
~~~~~~~
src/Discord.ts:86:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
86 console.log('[ERROR] Could not send command!')
~~~~~~~
src/Discord.ts:87:32 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
87 if (this.config.DEBUG) console.error(e)
~~~~~~~
src/Discord.ts:114:49 - error TS7006: Parameter 'user' implicitly has an 'any' type.
114 const user = this.client.users.find(user => user.username === username && user.discriminator === mentionParts[1])
~~~~
src/Discord.ts:165:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
165 console.log('[ERROR] Could not send Discord message through WebHook!')
~~~~~~~
src/Discord.ts:166:32 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
166 if (this.config.DEBUG) console.log(e)
~~~~~~~
src/Discord.ts:170:50 - error TS7006: Parameter 'ch' implicitly has an 'any' type.
170 const channel = this.client.channels.find((ch) => ch.id === this.config.DISCORD_CHANNEL_ID && ch.type === 'text') as TextChannel
~~
src/Discord.ts:174:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
174 console.log(`[ERROR] Could not find channel with ID ${this.config.DISCORD_CHANNEL_ID}!`)
~~~~~~~
src/MinecraftHandler.ts:1:16 - error TS2307: Cannot find module 'fs'.
1 import fs from 'fs'
~~~~
src/MinecraftHandler.ts:2:18 - error TS2307: Cannot find module 'path'.
2 import path from 'path'
~~~~~~
src/MinecraftHandler.ts:3:22 - error TS2307: Cannot find module 'tail'.
3 import { Tail } from 'tail'
~~~~~~
src/MinecraftHandler.ts:4:21 - error TS2307: Cannot find module 'express'.
4 import express from 'express'
~~~~~~~~~
src/MinecraftHandler.ts:33:30 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
33 if (this.config.DEBUG) console.log('[DEBUG] Line ignored')
~~~~~~~
src/MinecraftHandler.ts:37:28 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
37 if (this.config.DEBUG) console.log('[DEBUG] Received ' + data)
~~~~~~~
src/MinecraftHandler.ts:48:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
48 console.log('[DEBUG] Regex could not match the string:')
~~~~~~~
src/MinecraftHandler.ts:49:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
49 console.log('Received: "' + data + '", Regex matches lines that start with: "' + this.config.REGEX_SERVER_PREFIX + '"')
~~~~~~~
src/MinecraftHandler.ts:61:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
61 console.log('[DEBUG]: A player sent a chat message')
~~~~~~~
src/MinecraftHandler.ts:68:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
68 console.log('[ERROR] Could not parse message: ' + logLine)
~~~~~~~
src/MinecraftHandler.ts:75:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
75 console.log('[DEBUG] Username: ' + matches[1])
~~~~~~~
src/MinecraftHandler.ts:76:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
76 console.log('[DEBUG] Text: ' + matches[2])
~~~~~~~
src/MinecraftHandler.ts:87:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
87 console.log(`[DEBUG]: A player's connection status changed`)
~~~~~~~
src/MinecraftHandler.ts:94:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
94 console.log('[DEBUG] A player has made an advancement')
~~~~~~~
src/MinecraftHandler.ts:109:13 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
109 console.log(
~~~~~~~
src/MinecraftHandler.ts:125:19 - error TS7006: Parameter 'request' implicitly has an 'any' type.
125 this.app.use((request, response, next) => {
~~~~~~~
src/MinecraftHandler.ts:125:28 - error TS7006: Parameter 'response' implicitly has an 'any' type.
125 this.app.use((request, response, next) => {
~~~~~~~~
src/MinecraftHandler.ts:125:38 - error TS7006: Parameter 'next' implicitly has an 'any' type.
125 this.app.use((request, response, next) => {
~~~~
src/MinecraftHandler.ts:138:41 - error TS7006: Parameter 'req' implicitly has an 'any' type.
138 this.app.post(this.config.WEBHOOK, (req, res) => {
~~~
src/MinecraftHandler.ts:138:46 - error TS7006: Parameter 'res' implicitly has an 'any' type.
138 this.app.post(this.config.WEBHOOK, (req, res) => {
~~~
src/MinecraftHandler.ts:146:33 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node`.
146 const port: number = Number(process.env.PORT) || this.config.PORT
~~~~~~~
src/MinecraftHandler.ts:149:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
149 console.log('[INFO] Bot listening on *:' + port)
~~~~~~~
src/MinecraftHandler.ts:159:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
159 console.log('[INFO] Please enter the following command on your server running the Minecraft server:')
~~~~~~~
src/MinecraftHandler.ts:161:11 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
161 console.log(' Replace "PATH_TO_MINECRAFT_SERVER_INSTALL" with the path to your Minecraft server install')
~~~~~~~
src/MinecraftHandler.ts:162:27 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
162 if (defaultUrl) console.log(' and "YOUR_URL" with the URL/IP of the server running Shulker!')
~~~~~~~
src/MinecraftHandler.ts:164:27 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
164 if (defaultUrl) console.log(' Replace "YOUR_URL" with the URL/IP of the server running Shulker')
~~~~~~~
src/MinecraftHandler.ts:173:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
173 console.log(` \`tail -F ${mcPath} | grep --line-buffered "${grepMatch}" | while read x ; do echo -ne $x | curl -X POST -d @- http://${url}:${port}${this.config.WEBHOOK} ; done\``)
~~~~~~~
src/MinecraftHandler.ts:175:11 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
175 console.log(' Please note that the above command can send a lot of requests to the server. Disable the non-text messages (such as "SHOW_PLAYER_CONN_STAT") to reduce this if necessary.')
~~~~~~~
src/MinecraftHandler.ts:183:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
183 console.log(`[INFO] Using configuration for local log file at "${this.config.LOCAL_FILE_PATH}"`)
~~~~~~~
src/MinecraftHandler.ts:196:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
196 console.log('[ERROR] Error tailing log file: ' + error)
~~~~~~~
src/Rcon.ts:3:17 - error TS2307: Cannot find module 'net'.
3 import net from 'net'
~~~~~
src/Rcon.ts:32:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
32 console.log('[INFO] Authenticated with ' + ip + ':' + port)
~~~~~~~
src/Rcon.ts:35:35 - error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node`.
35 this.socket.on('data', (data: Buffer) => {
~~~~~~
src/Rcon.ts:43:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
43 console.log('Unexpected rcon response', id, type, response)
~~~~~~~
src/Rcon.ts:47:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
47 console.log('[DEBUG] Rcon closed!')
~~~~~~~
src/Rcon.ts:64:9 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
64 console.log('[ERROR] Could not send password to Rcon server!')
~~~~~~~
src/Rcon.ts:65:25 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
65 if (this.debug) console.error(e)
~~~~~~~
src/Rcon.ts:74:13 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
74 console.log('[ERROR] Could not send password to Rcon server!')
~~~~~~~
src/Rcon.ts:75:29 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
75 if (this.debug) console.error(e)
~~~~~~~
src/Rcon.ts:94:18 - error TS2552: Cannot find name 'Buffer'. Did you mean 'buff'?
94 const buff = Buffer.alloc(length)
~~~~~~
src/Rcon.ts:94:11
94 const buff = Buffer.alloc(length)
~~~~
'buff' is declared here.
src/Rcon.ts:106:23 - error TS2304: Cannot find name 'setTimeout'.
106 const timeout = setTimeout(() => {
~~~~~~~~~~
src/Rcon.ts:112:9 - error TS2304: Cannot find name 'clearTimeout'.
112 clearTimeout(timeout)
~~~~~~~~~~~~
src/Rcon.ts:115:11 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
115 console.log('[DEBUG] Received response: ' + response)
~~~~~~~
src/Shulker.ts:15:25 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node`.
15 const configFile = (process.argv.length > 2) ? process.argv[2] : '../config.json'
~~~~~~~
src/Shulker.ts:15:52 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node`.
15 const configFile = (process.argv.length > 2) ? process.argv[2] : '../config.json'
~~~~~~~
src/Shulker.ts:16:5 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
16 console.log('[INFO] Using configuration file:', configFile)
~~~~~~~
src/Shulker.ts:17:19 - error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
17 this.config = require(configFile)
~~~~~~~
src/Shulker.ts:19:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
19 console.log('[ERROR] Could not load config file!')
~~~~~~~
src/Shulker.ts:24:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
24 console.log('[INFO] Using Discord WebHooks to send messages')
~~~~~~~
src/Shulker.ts:26:7 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
26 console.log('[INFO] Using the Discord bot to send messages')
~~~~~~~
Found 69 errors.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Ok figured it out but now I am encountering this. :/
(Already installed typescript and changed some permission stuff, that was giving me other issues to get even this far.)
from shulker.
Did you yarn install
/yarn
before running those commands?
from shulker.
shulker$ sudo yarn add / yarn
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "unsure how to copy this: /dev/autofs".
info If you think this is a bug, please open a bug report with the information provided in "/home/users/luca/mcvanilla/shulker/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
The Error Log
https://pastebin.com/PxBkRcSs
from shulker.
No just run yarn install
from shulker.
warning " > [email protected]" has unmet peer dependency "@discordjs/uws@^10.149.0".
warning "tslint-config-standard > [email protected]" has unmet peer dependency "tslint@^5.0.0".
are these normal ? (besides those warnings everything went through with the install this time.)
from shulker.
Yeah, those are okay.
from shulker.
[ERROR] Could not send Discord message through WebHook!
Any idea what could cause this but at least the bot is running now :D
from shulker.
Nevermind it is running now, thank you very much for your Help getting it running. It probably just needed some more time to setup.
from shulker.
Related Issues (20)
- Discord mentions in MC don't successfully mention in Discord
- Discord messages not in minecraft anymore HOT 8
- Error on sending message from discord to mc HOT 3
- ERR_BUFFER_OUT_OF_BOUNDS HOT 2
- Help with Regex HOT 10
- Help with setting up bot on heroku
- The datapack does not show in my minecraft server HOT 2
- Death message false positives HOT 1
- unable to build HOT 1
- "Cannot read property 'id' of undefined" HOT 14
- player head don't show up in discord as player
- How can I add 2nd channel to send commands to server
- Messages containing norwegian letters Γ¦ ΓΈ Γ₯
- Please help me create the bot I am hella confused. My Discord LUCKY#1840 HOT 1
- Can't get it to work on 1.7.10 Minecraft (GT: New Horizons) HOT 1
- Unicode characters issue in names when sending from Discord to Minecraft
- `/` in RCON commands do not work on Spigot servers
- When @ someone on discord a zero width space unicode is part of the message
- Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet -1/0 (yu) was larger than I expected, found 32 bytes extra whilst reading packet 0 HOT 1
- Chat -> Discord is not working. Everything else works as expected. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shulker.