Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use lc to create question save to database error #60

Closed
SmallTeddy opened this issue Mar 15, 2024 · 0 comments
Closed

use lc to create question save to database error #60

SmallTeddy opened this issue Mar 15, 2024 · 0 comments
Assignees

Comments

@SmallTeddy
Copy link
Member

SmallTeddy commented Mar 15, 2024

Sometimes, when using the LC command to create a question, the question is successfully generated in the folder, but the console prompts the storage database to report an error:

/Users/name/Documents/GitHub/leetcode-practice/node_modules/.pnpm/realm@12.6.2/node_modules/realm/dist/assert.js:52
    assert(typeof value === "string", () => new internal_1.TypeAssertionError("a string", value, target));
                                            ^

TypeAssertionError: Expected value to be a string, got null
    at /Users/zhangzeming/Documents/GitHub/leetcode-practice/node_modules/.pnpm/realm@12.6.2/node_modules/realm/dist/assert.js:52:45
    at assert (/Users/zhangzeming/Documents/GitHub/leetcode-practice/node_modules/.pnpm/realm@12.6.2/node_modules/realm/dist/assert.js:34:43)
    at assert.string (/Users/zhangzeming/Documents/GitHub/leetcode-practice/node_modules/.pnpm/realm@12.6.2/node_modules/realm/dist/assert.js:52:5)
    at /Users/zhangzeming/Documents/GitHub/leetcode-practice/node_modules/.pnpm/realm@12.6.2/node_modules/realm/dist/TypeHelpers.js:157:35
    at /Users/zhangzeming/Documents/GitHub/leetcode-practice/node_modules/.pnpm/realm@12.6.2/node_modules/realm/dist/PropertyHelpers.js:43:31
    at Proxy.set (/Users/zhangzeming/Documents/GitHub/leetcode-practice/node_modules/.pnpm/realm@12.6.2/node_modules/realm/dist/ClassMap.js:62:21)
    at Realm.Object.create (/Users/zhangzeming/Documents/GitHub/leetcode-practice/node_modules/.pnpm/realm@12.6.2/node_modules/realm/dist/Object.js:174:42)
    at Realm.create (/Users/zhangzeming/Documents/GitHub/leetcode-practice/node_modules/.pnpm/realm@12.6.2/node_modules/realm/dist/Realm.js:553:50)
    at file:///Users/zhangzeming/Documents/GitHub/leetcode-practice/common/utils/store/controller/question.js:27:27
    at Realm.write (/Users/zhangzeming/Documents/GitHub/leetcode-practice/node_modules/.pnpm/realm@12.6.2/node_modules/realm/dist/Realm.js:788:22) {
  expected: 'a string',
  value: null
}
image
@SmallTeddy SmallTeddy changed the title use lc to create question store to database error use lc to create question save to database error Mar 15, 2024
wh131462 added a commit that referenced this issue Mar 17, 2024
* feat(update): check update when first run lc and will be not allow until one day

* fix: fix the hidden check update

* docs: instead of incorrect symble

* chore: remove unsless code (#45)

* docs: add contributors markdown

* ci(release): modify ci to release when tag add and change the release-it to create new branch

* feat(update): check update when first run lc and will be not allow until one day

* chore(release): set new branch by correct command

* docs: update QRCode (#39)

* docs: simplified doc

* chore: release v1.0.9-0

* fix: fix the hidden check update

* chore: remove unsless code

---------

Co-authored-by: thinkasany <480968828@qq.com>

* docs: simplifying the npm install command (#44)

* ci(test): update file name (#46)

* docs: add ci and npm badge (#47)

* ci: update name (#48)

* chore(pre-commit): modify command (#49)

* feat: add get question tag type api

* fix: finder error

* feat(update): check update when first run lc and will be not allow until one day

* fix: fix the hidden check update

* feat: add getAllQuestion api

* feat: add all question store

* feat: add lc all option

* fix: allQuestion controller

* fix: allQuestion realm data structure

* chore: fix update error info

* chore: finish lc -a and store get set question by all question store

* fix: delete the list of irrelevant questions from the front end

* feat: get 'jsonExampleTestcases', 'exampleTestcases'

* chore: change jsdoc for function

* fix(lk): fix the lk in specified directory

fix #61

* chore: prettier add print width

* fix(lc): fix the process to handle the question has no enough data

fix #60

* perf(allquestion): modify the controller to get/set preferly

fix #63

* feat lf command select mode (#65)

* feat: add lf select mode

---------

Co-authored-by: thinkasany <480968828@qq.com>
Co-authored-by: SmallTeddy <zhangzeming1212@gmail.com>
Co-authored-by: SmallTeddy <61453917+SmallTeddy@users.noreply.github.com>
Co-authored-by: hyfree-msi <wangxianqiangcn@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants