usememos / memos

An open-source, lightweight note-taking solution. The pain-less way to create your meaningful notes. Your Notes, Your Way.
https://usememos.com
MIT License
34.06k stars 2.47k forks source link

Error when building production locally #3497

Closed xhemj closed 5 months ago

xhemj commented 5 months ago

Describe the bug

It works fine for local development, but when trying to build the production, it keeps prompting the error:

{
  "error": "open dist\\index.html: The system cannot find the path specified.",
  "message": "Internal Server Error"
}

My computer system: Windows 11 Attempted architecture: windows/amd64 and linux/amd64

Steps to reproduce

  1. Development is done locally and tested without problems
  2. Run scripts\build.ps1 to try to build production
  3. Build completes with no errors
  4. Running the build program locally gives an error

The version of Memos you're using

0.21.0

Screenshots or additional context

No response

boojack commented 5 months ago

The scripts\build.ps1 might be outdata and has been removed in https://github.com/usememos/memos/commit/20b8a97a883e1ca660cd18791fc3dfa0ee9d9aec. But you can always refer to the scripts inside the Dockerfile to build production files.