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

Wrong example files structure and wrong channel transport version #2

Open
hipertracker opened this issue Sep 6, 2017 · 2 comments
Open

Comments

@hipertracker
Copy link

hipertracker commented Sep 6, 2017

This example does not work :( (the files structure is also different than generated by official Phoenix 1.3)

git clone https://github.com/geolessel/react-phoenix-example-1.3.git
cd react-phoenix-example-1.3
mix deps.get
cd assets && npm install && cd ..
mix phx.server

Result:

...
error] #PID<0.2037.0> running ReactPhoenixExample.Web.Endpoint terminated
Server: localhost:4000 (http)
Request: GET /
** (exit) an exception was raised:
    ** (RuntimeError) Failed to call to json service Elixir.ReactPhoenix.ReactIo Cannot load component: priv/static/js/components/hello.js
        (react_phoenix) lib/react_phoenix/react_io.ex:4: ReactPhoenix.ReactIo.json_call!/2
        (react_phoenix) lib/react_phoenix/server_side.ex:151: ReactPhoenix.ServerSide.react_component/2
        (react_phoenix_example) lib/react_phoenix_example/web/controllers/page_controller.ex:5: ReactPhoenixExample.Web.PageController.index/2
        (react_phoenix_example) lib/react_phoenix_example/web/controllers/page_controller.ex:1: ReactPhoenixExample.Web.PageController.action/2
        (react_phoenix_example) lib/react_phoenix_example/web/controllers/page_controller.ex:1: ReactPhoenixExample.Web.PageController.phoenix_controller_pipeline/2
        (react_phoenix_example) lib/react_phoenix_example/web/endpoint.ex:1: ReactPhoenixExample.Web.Endpoint.instrument/4
        (phoenix) lib/phoenix/router.ex:278: Phoenix.Router.__call__/1
        (react_phoenix_example) lib/react_phoenix_example/web/endpoint.ex:1: ReactPhoenixExample.Web.Endpoint.plug_builder_call/2
        (react_phoenix_example) lib/plug/debugger.ex:123: ReactPhoenixExample.Web.Endpoint."call (overridable 3)"/2
        (react_phoenix_example) lib/react_phoenix_example/web/endpoint.ex:1: ReactPhoenixExample.Web.Endpoint.call/2
        (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
        (cowboy) /Users/hipertracker/Documents/MOJE/projekty/prototypes/react-phoenix-example-1.3/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4
[error] The client's requested channel transport version "2.0.0" does not match server's version requirements of "~> 1.0"
@Linbubin
Copy link

Linbubin commented Sep 13, 2017

I have this problem, too.

17:24:26 - info: compiled 178 files into 2 files, copied 3 in 2.2 sec
[error] The client's requested channel transport version "2.0.0" does not match server's version requirements of "~> 1.0"
[error] The client's requested channel transport version "2.0.0" does not match server's version requirements of "~> 1.0"
[error] The client's requested channel transport version "2.0.0" does not match server's version requirements of "~> 1.0"

image

@Linbubin
Copy link

and when i run url localhost:4000

Failed to call to json service Elixir.ReactPhoenix.ReactIo Cannot load component: priv/static/js/components/hello.js

image

and the file priv/static/js/components/hello.js is not exist.
image

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