SilentByte / selfie2anime-site

What do YOU look like in Anime? Here's the source of selfie2anime.com
https://selfie2anime.com/
MIT License
212 stars 34 forks source link

gen/portfolio-tree.json ismisisng #2

Open duocang opened 5 years ago

duocang commented 5 years ago

Hi. When I run the code, I got the following error:

image

Can you please fix it?

SilentByte commented 5 years ago

Hi

Try running a full build with DISABLE_IMAGE_OPTIMIZATION=1 npm run build before running npm run serve. If that fixes it I'll adjust the build script.

duocang commented 5 years ago

Hi.

I did what you said. Actually, I wondered that the error is quite straightforward, the tree.gen.json is missing.

image

SilentByte commented 5 years ago

Quick explanation: the file in question is being generated during the build process (and is needed for running the dev server). It basically contains a list of all images for the portfolio section of the website. The build process also generates the composite images and compresses/optimizes them.

I think I fixed the issue (at least it builds correctly now here) and updated the README:

Starting from a fresh clone:

  1. Run npm install
  2. Run DISABLE_IMAGE_OPTIMIZATION=1 npm run build
  3. Run npm run serve

Please let me know if this works for you.

Thanks!

BugApe commented 5 years ago

Hello, thank you very much for such a great project as open source.

I encountered the same problem. I tried to run "DISABLE_IMAGE_OPTIMIZATION=1 npm run build" to fix it, but I was prompted that it “DISABLE_IMAGE_OPTIMIZATION=1 wasn't a runnable command”.

SilentByte commented 5 years ago

Hi

I was assuming a Bash shell here. Depending on what system/shell you are using, you may have to adjust the command. All that is doing is calling npm run build with the environment variable DISABLE_IMAGE_OPTIMIZATION set to 1.

BugApe commented 5 years ago

Hi.

I tried it in the bash, and it still didn't work. It seems the problem is on the last command " git submodule update --init --recursive" 捕获

SilentByte commented 5 years ago

The error seems to be related to your Git installation. I don't use Windows, so I can't really help with this. A quick Google search brought up this: https://stackoverflow.com/questions/49256190/how-to-fix-git-sh-setup-file-not-found-in-windows