renesansz / discord-greeter-bot

My greeter bot for Discord
MIT License
49 stars 38 forks source link

npm install discord.io winston –save not working #257

Closed IanDaBest closed 4 years ago

IanDaBest commented 4 years ago

Hello. I am trying to make a discord bot but when I do npm install discord.io winston –save it doesn't work. It says: npm ERR! code EJSONPARSE npm ERR! file C:\Users\IanDaBest\Discord\DaBestBot\codes\package.json npm ERR! JSON.parse Failed to parse json npm ERR! JSON.parse Unexpected token “ in JSON at position 3 while parsing near '{ npm ERR! JSON.parse “name”: “DaBestBot”,...' npm ERR! JSON.parse Failed to parse package.json data. npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\IanDaBest\AppData\Roaming\npm-cache_logs\2020-06-02T08_14_09_511Z-debug.log

I don't know javascript at all and I am just trying to make my own discord bot.

Details: Following tutorial: https://www.digitaltrends.com/gaming/how-to-make-a-discord-bot/ OS: Windows 10 I am using Windows Powershell If that helps

renesansz commented 4 years ago

Hello. I am trying to make a discord bot but when I do npm install discord.io winston –save it doesn't work. It says: npm ERR! code EJSONPARSE npm ERR! file C:\Users\IanDaBest\Discord\DaBestBot\codes\package.json npm ERR! JSON.parse Failed to parse json npm ERR! JSON.parse Unexpected token “ in JSON at position 3 while parsing near '{ npm ERR! JSON.parse “name”: “DaBestBot”,...' npm ERR! JSON.parse Failed to parse package.json data. npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\IanDaBest\AppData\Roaming\npm-cache_logs\2020-06-02T08_14_09_511Z-debug.log

I don't know javascript at all and I am just trying to make my own discord bot.

Details: Following tutorial: https://www.digitaltrends.com/gaming/how-to-make-a-discord-bot/ OS: Windows 10 I am using Windows Powershell If that helps

Please post your package.json content here

IanDaBest commented 4 years ago

its is as follows:

{ “name”: “DaBestBot”, “version”: “1.0.0”, “description”: “This is DaBestBot”, “main”: “bot.js”, “author”: “IanDaBest”, “dependencies”: {} }

renesansz commented 4 years ago

@IanDaBest it seems you are using wrong double quote character, this might have been caused when you copy/paste the code from Medium. Notice the difference with ” and "

Use this instead

{
"name": "DaBestBot",
"version": "1.0.0",
"description": "This is DaBestBot",
"main": "bot.js",
"author": "IanDaBest",
"dependencies": {}
}
IanDaBest commented 4 years ago

it still didn't work. It said

npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name "–save": Tags may not have any characters that encodeURIComponent encodes.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\IanDaBest\AppData\Roaming\npm-cache_logs\2020-06-08T06_54_21_322Z-debug.log

On Mon, 8 Jun 2020 at 11:23, Renemari Padillo notifications@github.com wrote:

@IanDaBest https://github.com/IanDaBest it seems you are using wrong double quote character, this might have been caused when you copy/paste the code from Medium.

Use this instead, notice the difference with ” and "

{

"name": "DaBestBot",

"version": "1.0.0",

"description": "This is DaBestBot",

"main": "bot.js",

"author": "IanDaBest",

"dependencies": {}

}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/renesansz/discord-greeter-bot/issues/257#issuecomment-640313648, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZPTH6EOS5B3TGQNT7K36LRVQ4RFANCNFSM4NQP4OTQ .

renesansz commented 4 years ago

do npm install discord.io winston --save it should be --save not –save

this might have been caused when you copy/paste the code from your reference site.

IanDaBest commented 4 years ago

this happened. is this good?

npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN DaBestBot@1.0.0 No repository field. npm WARN DaBestBot@1.0.0 No license field.

1 package is looking for funding run npm fund for details

found 0 vulnerabilities

On Mon, 8 Jun 2020 at 19:28, Renemari Padillo notifications@github.com wrote:

npm install discord.io winston --save it should be --save not –save

this might have been caused when you copy/paste the code from your reference site.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/renesansz/discord-greeter-bot/issues/257#issuecomment-640486557, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZPTH652ETTK2HHXDSDFZ3RVSVMZANCNFSM4NQP4OTQ .

sarthaktexas commented 4 years ago

yes, that is fine.

renesansz commented 4 years ago

since this if resolved. will close this ticket now.