簡體   English   中英

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\_logs\2018-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”: {}
}

對於可能是一個愚蠢的問題,我感到抱歉,並且我感謝大家願意提供的任何指導。

您使用的引號字符無效。 "是不同的字符。您應該使用最后一個。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM