Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

index.html built with npm run build does not show html elements #31

Closed
ghost opened this issue Aug 3, 2016 · 6 comments
Closed

index.html built with npm run build does not show html elements #31

ghost opened this issue Aug 3, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Aug 3, 2016

Hi, awesome project. Congrats!
After building the example project and placing the folder (index + 2 js files) in webserver (apache) does not open any html element. However console in chrome tools does show the show output as when the project is run in dev mode (npm start). What is I'm missing?
Thanks in advance

@eliperelman
Copy link
Contributor

@lavokad hello! Could you please share the result of running npm run build, and maybe any logs from your webserver? Maybe a screenshot as well?

@ghost
Copy link
Author

ghost commented Aug 3, 2016

@eliperelman that is weird. I finally put the built project in a basic node server and it works perfectly. However, I checked apache logs in the access.log and there is nothing wrong:

127.0.0.1 - - [03/Aug/2016:20:13:26 +0300] "GET /build/vendor.bundle.js HTTP/1.1" 200 712
127.0.0.1 - - [03/Aug/2016:20:13:26 +0300] "GET /build/bundle.js HTTP/1.1" 200 841477
127.0.0.1 - - [03/Aug/2016:20:13:33 +0300] "GET /build/ HTTP/1.1" 304 -
127.0.0.1 - - [03/Aug/2016:20:13:33 +0300] "GET /build/vendor.bundle.js HTTP/1.1" 304 -
127.0.0.1 - - [03/Aug/2016:20:13:33 +0300] "GET /build/bundle.js HTTP/1.1" 304 -

npm run build terminates nicely.
Thanks again.

@eliperelman
Copy link
Contributor

It looks like you are serving the files from above the build/ directory, but you should be serving the contents of the build directly. For example, the GET request should be something like:

127.0.0.1 - - [03/Aug/2016:20:13:26 +0300] "GET /vendor.bundle.js HTTP/1.1" 200 712

Since the path of the root directory is different than the path that the app will look for to import more JS files, it may not load correctly.

@ghost
Copy link
Author

ghost commented Aug 3, 2016

oh, I see now. Sorry. Just one more thing, build version has these console outputs:
action @ 00:34:48.140 @@router/LOCATION_CHANGE ...
Where can I disable them?

@eliperelman
Copy link
Contributor

@lavokad that appears to be a bug in the implementation of our app.js code. I'm trying to determine what to do with that code in #28.

@ghost
Copy link
Author

ghost commented Aug 5, 2016

ok, thanks!

@ghost ghost closed this as completed Aug 5, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant