You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But that stopped working after the syntax highlighting stuff got released with the following error:
❯ npx github-readme-to-html -t npx-import
Need to install the following packages:
github-readme-to-html@1.0.9
Ok to proceed? (y) y
failed to read ./node_modules/highlight.js/styles/github.css
/Users/glen/.npm/_npx/90908b89e457455e/node_modules/github-readme-to-html/index.js:54
throw err;
^
[Error: ENOENT: no such file or directory, open './node_modules/highlight.js/styles/github.css'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: './node_modules/highlight.js/styles/github.css'
}
Node.js v18.3.0
I think this is because you're assuming highlight.js is installed as a dependency of the current directory. To fix it temporarily, I've changed my Pages command to the following:
And things should all just work? If it's installed locally, it'll find that, otherwise it should look inside the npx temporary directory to use the copy there.
The text was updated successfully, but these errors were encountered:
Rather than adding
github-readme-to-html
as a dev dependency, I've been invoking it using:To build https://npx-import.pages.dev/
But that stopped working after the syntax highlighting stuff got released with the following error:
I think this is because you're assuming
highlight.js
is installed as a dependency of the current directory. To fix it temporarily, I've changed my Pages command to the following:BUT, I think this should be fairly easy to fix. This line https://github.com/jrnewton/github-readme-to-html/blob/main/index.js#L13:
Should (I think!) be able to be replaced with:
And things should all just work? If it's installed locally, it'll find that, otherwise it should look inside the
npx
temporary directory to use the copy there.The text was updated successfully, but these errors were encountered: