Skip to content

ResolverError and .remarkrc file not working on VSCode Windows #29

@drtingtp

Description

@drtingtp

I believe I have encountered a path resolving issue with remark-lint-frontmatter-schema on VSCode Windows (v1.84.2).

I am using a VSCode test profile with only vscode-remark extension (v2.1.0) installed.

Here's how the bug is produced:

  1. Clone the demo repo.
  2. Follow the installation step pnpm install remark ...
  3. Follow the installation step code --install-extension ...
  4. Follow the instruction and create the root config ./.remarkrc.mjs
  5. Explore and tinker with the content folder md files to observe the bug behaviour:

behind-the-gare-st-lazare__local-broken.md file gives an error

YAML schema file load/parse: content\creative-work.schema.yaml — ResolverError: Error opening file "D:\test remark\node_modules\.pnpm\@apidevtools+json-schema-ref-parser@11.1.0\node_modules\@apidevtools\json-schema-ref-parser\dist\content\creative-work.schema.yaml" ENOENT: no such file or directory, open 'D:\test remark\node_modules\.pnpm\@apidevtools+json-schema-ref-parser@11.1.0\node_modules\@apidevtools\json-schema-ref-parser\dist\content\creative-work.schema.yaml'

however, if the '$schema' parameter is set to ./content/creative-work.schema.yaml, the linting works

image

The the-shipwreck__global-broken.md file does not report any linting error when opened. When '$schema': ./content/creative-work.schema.yaml is pasted, the linting problems show up.

image
image

There is no mentioning of whether the .remarkrc.mjs file was loaded correctly - there was no error message, but when I supply a wrong schema path or target path, it still does not produce any error message.

This is my pnpm-lock file, hope it helps figuring out what went wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions