Discord Bot JSON 解析错误

Discord Bot JSON Parse Error

我应该声明:

  1. 我没有使用 js 的经验,但对其他语言有一些经验
  2. 来这里之前,我确实尝试过自己解决这个问题。

我基本上只是在尝试设置机器人,并在发生这种情况时尝试安装机器人依赖项:

D:\>cd\Discord Bots\Ark FTW

D:\Discord Bots\Ark FTW>npm install discord.io winston-save
npm ERR! file D:\Discord Bots\Ark FTW\package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token “ in JSON at position 3 while parsing near '{
npm ERR! “name”: “Ark FTW”,
npm ERR! ...'
npm ERR! File: D:\Discord Bots\Ark FTW\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\temp5\AppData\Roaming\npm-cache\_logs18-08-28T18_14_53_243Z-debug.log

我使用了教程中的一段代码来设置机器人,但我不知道我在寻找什么语法错误,尽管在过去的两个小时里我一直在努力找出它。我认为这对任何有一点经验的人来说都是显而易见的,但我不是。

这是完整的 JSON 文件:

{
  “name”: “Ark FTW”,
  “version”: “1.0.0”,
  “description”: “I wanna be a real bot!”,
  “main”: “bot.js”,
  “author”: “Soldiercide”,
  “dependencies”: {}
}

对于这个可能很愚蠢的问题,我深表歉意,感谢大家愿意提供的任何指导。

您使用的引号无效。 and and " 是不同的字符。你应该使用最后一个。