decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.66k stars 3.02k forks source link

windows dev-test environment markdown issue - process.cwd, vfile #7125

Closed hip3r closed 4 months ago

hip3r commented 4 months ago

Describe the bug On windows system, there is an issue with markdown widget. This happens only when running npm run start, but not when editing active project (deployed on netlify). Console reports error ´process.cwd is not a function´ from VFile plugin (image 1)

If I try to create new post, it looks ok until I try to edit markdown widget. When I change something in markdown, console reports error process.cwd is not a function. And markdown value is detected as empty (images 2-4)

To Reproduce

  1. on windows run npm run start
  2. click on random post, or go to http://localhost:8080/#/collections/posts/entries/2024-03-01-post-number-20

Expected behavior markdown field should be loaded and it's value properly detected

Screenshots image image image image

Applicable Versions:

CMS configuration Issue is replicable on default configuration (config.yml in dev-test)

Additional context I found the solution, VFile plugin needs to be updated. This should solve the issue https://github.com/vfile/vfile/pull/59 I'll make PR in short