selfie2anime-site icon indicating copy to clipboard operation
selfie2anime-site copied to clipboard

gen/portfolio-tree.json ismisisng

Open duocang opened this issue 5 years ago • 7 comments

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

image

Can you please fix it?

duocang avatar Sep 03 '19 17:09 duocang

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.

SilentByte avatar Sep 03 '19 17:09 SilentByte

Hi.

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

image

duocang avatar Sep 03 '19 18:09 duocang

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!

SilentByte avatar Sep 04 '19 02:09 SilentByte

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”.

BugApe avatar Sep 08 '19 09:09 BugApe

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.

SilentByte avatar Sep 08 '19 09:09 SilentByte

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" 捕获

BugApe avatar Sep 08 '19 15:09 BugApe

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

SilentByte avatar Sep 09 '19 01:09 SilentByte