question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--config option does not accept relative path

See original GitHub issue

Hello

I have a doc repo structure like:

RepoFolderRoot
├───doc1
│       doc1.md
│       doc1.pdf
│
├───doc2
│   │   doc2.md
│   │   doc2.pdf
│
├───generate_pdf
│   │   config.json
│   │   mystyle.css

I tried to launch the md2pdf command from the root folder (for scripting) by trying: md2pdf --config-file .\generate-pdf\config.json .\doc1\doc1.md or md2pdf --config-file generate-pdf\config.json .\doc1\doc1.md or md2pdf --config-file \generate-pdf\config.json .\doc1\doc1.md

And I always got aWarning: couldn't read config file: \generate-pdf\config.json

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Zivagacommented, Oct 31, 2018

😃 Sure. I will use it in a more scripted way very soon. If I think about ant improvement, I’ll let you know.

Thanks!

0reactions
neklothcommented, Jun 12, 2019

Hi

The relative path changed… it used to consider the relative path from the execution path, now, it considers relative path from the MD file.

It used to work with:

  "stylesheet": [
    ".\\mystyle.css"
  ],

when executed from c:\RepoFolderRoot\

Error is:

 md2pdf --config-file .\generate_pdf\config.json ./doc1/doc1.md
  × generating PDF from ./doc1/doc1.md
    → ENOENT: no such file or directory, open 'c:\RepoFolderRoot\doc1\mystyle.css'

and now works with…

  "stylesheet": [
    "C:\\RepoFolderRoot\\generate_pdf\\mystyle.css"
  ],

It is not very convenient for me, as my stylesheet lifecyle is different from doc lifecycle, and I’m not the only one to use this repo (and of course, all of us do not have the same folder organisation…)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Config property `parserOptions.project` relative path resolving
When using a relative parserOptions.project path, I've found that the path is not relative to the config file (e.g. .eslintrc.js ) referencing ...
Read more >
Unable to select correct relative path for accessing a config file
You have 2 options: 1. read-only properties. Use this approach if these are some internal properties the user should not be able to...
Read more >
Configure relative paths
A relative path binds policies to a specific relative path location (for example /test/path ). When the API Gateway receives a request on...
Read more >
Configuration Reference - Astro Documentation
The following reference covers all supported configuration options in Astro. ... The value can be either an absolute file system path or a...
Read more >
Documentation - Module Resolution - TypeScript
Use non-relative paths when importing any of your external dependencies. Module Resolution Strategies. There are two possible module resolution strategies: Node ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found