yuanqing/single-page-markdown-website

Could not resolve file: index.html

Frosty-J opened this issue · 3 comments

I have come here impressed by the example page. It would be nice to add a troubleshooting section with solutions for common issues. For example, I found that the Unexpected token { error can be fixed by using a newer version of NodeJS. So now I'm on 16.11.1. But, more importantly...

I've been unable to get past this Could not resolve file: index.html error. I've tried:

  • Building a webpage from the files as found in SPMW 0.0.24.
  • Building a webpage from my own "hello world" equivalent.
  • Using various names for the Markdown, such as README.md and index.md.
  • Creating build/index.html and index.html in hopes it'll write to one of them.
  • Giving the directory 777 Unix permissions.
  • Removing the --open flag from the command found in the quick start guide.
  • Building stuff in packages/single-page-markdown-website.

It gets as far as copying the images into the build directory, but no HTML file ever appears.

I guess it's trying but failing to read what is ~/.npm/_npx/d2cf9fed93aa31b4/node_modules/@single-page-markdown-website/frontend/lib/index.html on my computer?

The solution is to first do npm i single-page-markdown-website. I don't know a great deal about NodeJS. If this is generally required for SPMW to work, it should be added to the instructions. If not, close the issue, I guess.

lol came here for the same reason. recommend adding it to instructions.

Running via npx should be fixed as of 0.0.25