Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed on Running the Spacefold Demo Locally #40

Open
orbxball opened this issue Jan 13, 2021 · 2 comments
Open

Failed on Running the Spacefold Demo Locally #40

orbxball opened this issue Jan 13, 2021 · 2 comments

Comments

@orbxball
Copy link

I followed the instructions of ``Running the Spacefold Demo Locally'' but it failed with JSON parsing error.

>> yarn build
yarn run v1.22.10
$ next build && next export
info  - Creating an optimized production build
info  - Compiled successfully

> Build error occurred
SyntaxError: Unexpected token u in JSON at position 0

The commands I ran are

  1. clean clone this repo and then cd in
  2. yarn install
  3. yarn build -> trigger error
    3.1. if I skip 3. to run yarn start, it tells me there's no build file.
>> yarn start
yarn run v1.22.10
$ next start
Error: Could not find a production build in the '$HOME/spacefold/.next' directory. Try building your app with 'next build' before starting the production server. https://err.sh/vercel/next.js/production-start-no-build-id

Can someone point me out how to build it? appreciate it!

@rhlsthrm
Copy link
Contributor

Yikes, these instructions were horribly outdated. I just updated. Please give it another shot!

@orbxball
Copy link
Author

It works! Thanks for your help.
I have another question. When running npm run dev, compiling/building starts only after localhost:3000 is open, so there's a long waiting time for compilation before the page is ready. Is that possible to pre-build/compile all config file, so that next time npm run dev can open the page quicker?

>> npm run dev

> spacefold@0.2.0 dev $HOME/spacefold
> next dev

ready - started server on http://localhost:3000
event - compiled successfully  <= All these 4 start after localhost:300 is open
event - build page: /          <= 
wait  - compiling...           <= compilation take like 1min or so
event - compiled successfully  <=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants