markdowndb icon indicating copy to clipboard operation
markdowndb copied to clipboard

SQLITE_ERROR: table `tags` already exists

Open mohamedsalem401 opened this issue 1 year ago • 1 comments

The following error occurs when running the test (not always but sometimes randomly occurs and sometimes not).

 FAIL   markdowndb  src/tests/documentTypes.spec.ts (8.222 s)
  ● Console

    console.error
      Error: In __mocks__\content\blog\blog1.mdx for the blog schema.
          In "missingField" field: Required

      52 |               ","
      53 |             )}" field: ${err.message}`;
    > 54 |           console.error(errorMessage);
         |                   ^
      55 |         });
      56 |
      57 |         throw new Error(

      at src/lib/indexFolder.ts:54:19
          at Array.forEach (<anonymous>)
      at indexFolder (src/lib/indexFolder.ts:49:22)
      at MarkdownDB.<anonymous> (src/lib/markdowndb.ts:94:25)
      at src/lib/markdowndb.ts:7:71
      at __awaiter (src/lib/markdowndb.ts:3:12)
      at MarkdownDB.indexFolder (src/lib/markdowndb.ts:72:16)
      at src/tests/documentTypes.spec.ts:49:12
      at src/tests/documentTypes.spec.ts:7:71
      at __awaiter (src/tests/documentTypes.spec.ts:3:12)
      at Object.<anonymous> (src/tests/documentTypes.spec.ts:47:125)

  ● Document Types Schema Validate Testing › Should check if the title field is created and save in db
                                                                                                                                 
    create table `tags` (`name` varchar(255), primary key (`name`)) - SQLITE_ERROR: table `tags` already exists                  

mohamedsalem401 avatar Feb 26 '24 17:02 mohamedsalem401

This happens to me in practice every time I run my project. At one point it mysteriously didn't, but since then I have been unable to write and configure a Node-based project without this happening. I'd love to work with someone from the Datopian team to figure this out.

oliver-daniel avatar Jun 17 '24 14:06 oliver-daniel