https://www.dendron.so/ logo
l

luissanchezdev

03/10/2022, 4:11 PM
Good morning I have a question, after the latest release I cant use dendron-cli to export, I always get a typeerror undefined 'id'. Is it just me or anyone else has it?
j

Joshi

03/10/2022, 4:19 PM
Hey @User which command are you trying?
l

luissanchezdev

03/10/2022, 4:21 PM
Both export and dev, both give the same error
Copy code
8 | ) => {
   9 |   const { noteIndex: note, notes } = getNotes();
> 10 |   const body = await getNoteBody(note.id);
     |                                      ^
  11 |   const config = await getConfig();
  12 |   const customHeadContent: string | null = await getCustomHead();
  13 |   const collectionChildren = note.custom?.has_collection
This is the error I get when running it from the vscode Dendron: Publish Export. ``` ```
j

Joshi

03/10/2022, 4:59 PM
Hm. I tried on a fresh workspace following this(https://wiki.dendron.so/notes/e5st4LFLtIwwbQmC6JBaF/) guide and it works fine. Does this error also occurs after Reload Workspace?
l

luissanchezdev

03/10/2022, 5:00 PM
I will follow this
I tried after reloading and I get this usse
Copy code
C:\Users\GovaS\AppData\Local\Programs\Microsoft VS Code\TODO/package.json
that file doesnt exists
j

Joshi

03/10/2022, 5:11 PM
can you run the following commands locally in your workspace? npm init -y npm install @dendronhq/dendron-cli@latest
l

luissanchezdev

03/10/2022, 5:24 PM
trying it out
j

Joshi

03/10/2022, 5:25 PM
If you are starting fresh, you can follow steps in this guide.
l

luissanchezdev

03/10/2022, 5:41 PM
Ok I didnt start it fresh, I ran it in the existing one. This is the output from the command line
Copy code
{
  "level": 50,
  "time": 1646933898270,
  "pid": 15804,
  "hostname": "DESKTOP-4VKG2RE",
  "name": "publish <cmd>",
  "stack": "TypeError: value.replace is not a function\n    at encode (C:\\code\\dendron\\main\\node_modules\\stringify-entities\\lib\\core.js:7:17)\n    at encode (C:\\code\\dendron\\main\\node_modules\\stringify-entities\\lib\\encode.js:12:10)\n    at Object.serializeText [as text] (C:\\code\\dendron\\main\\node_modules\\hast-util-to-html\\lib\\text.js:12:7)\n    at serialize (C:\\code\\dendron\\main\\node_modules\\hast-util-to-html\\lib\\one.js:25:29)\n    at all (C:\\code\\dendron\\main\\node_modules\\hast-util-to-html\\lib\\all.js:14:22)\n    at Object.serializeElement [as element] (C:\\code\\dendron\\main\\node_modules\\hast-util-to-html\\lib\\element.js:33:13)\n    at serialize (C:\\code\\dendron\\main\\node_modules\\hast-util-to-html\\lib\\one.js:25:29)\n    at all (C:\\code\\dendron\\main\\node_modules\\hast-util-to-html\\lib\\all.js:14:22)\n    at Object.serializeElement [as element] (C:\\code\\dendron\\main\\node_modules\\hast-util-to-html\\lib\\element.js:33:13)\n    at serialize (C:\\code\\dendron\\main\\node_modules\\hast-util-to-html\\lib\\one.js:25:29)",
  "type": "Error",
  "msg": "value.replace is not a function"
}
I will create a fresh one
j

Joshi

03/10/2022, 5:46 PM
This bug looks familiar. Can you check if there's a note in this workspace that does not have string note title? There's an open issue for this bug: https://github.com/dendronhq/dendron/issues/2329
l

luissanchezdev

03/10/2022, 5:51 PM
well I initialized a new workspace and moved the vault and it worked hahaha
it may be something related with the workspace maybe
yle has all their IDs and titles
Every file has all its IDs and titles*
j

Joshi

03/10/2022, 5:52 PM
Glad it worked.
l

luissanchezdev

03/10/2022, 5:53 PM
Thank you, I will keep an eye if I can replicate it
thanks
4 Views