Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
294 views
in Technique[技术] by (71.8m points)

mongodb - Mongo: error when trying to import Javascript (OS: Ubuntu server)

I am trying to import this:

db.ranks.save({
    "rankid": "Owner",
    "displayName": "Owner",
    "generalWeight": 1,
    "displayWeight": 1,
    "gameColor": "§7",
    "gamePrefix": "prefix",
    "staffRank": false,
    "grantRequiresTotp": false,
    "queueMessage": "a"
})

I get this error:

2021-01-23T01:52:31.994+0000 E QUERY    [thread1] [/mongo/rank.js:4:4] SyntaxError: missing } after property list
Stack trace:
@(shell):1:1
----------
2021-01-23T01:52:31.994+0000 E QUERY    [thread1] Error: error loading js file: /mongo/rank.js @(shell):1:1
>

Please help me fix this error (I am new to mongo).

question from:https://stackoverflow.com/questions/65855001/mongo-error-when-trying-to-import-javascript-os-ubuntu-server

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...