-
Notifications
You must be signed in to change notification settings - Fork 13
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
Compilation error. #9
Comments
It looks like the version of Phoenix being used (1.0.3) is incompatible with Erlang 19 and newer. An upgrade to the latest version of Phoenix is required. I don't know how much effort that would require, it might be as simple as updating the dependencies in defp deps do
[{:phoenix, "~> 1.2.1"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_html, "~> 2.6"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"}]
end Then run: mix deps.update --all |
Thanks Ben, I will try it!
That got it to compile, now just getting some run time error,:
(ArgumentError) assign @inner not available in eex template. Looks like the kind of stuff will I need to know about, so I will figure that out... thanks again.
BTW, this is exactly the kind of architecture I have been envisioning for my next project, glad I had the issue! https://10consulting.com/2017/01/04/building-a-cqrs-web-application-in-elixir-using-phoenix/
…On Sun, Jun 25, 2017 at 3:12 PM, Ben Smith ***@***.***> wrote:
It looks like the version of Phoenix being used (1.0.3) is incompatible
with Erlang 19 and newer. An upgrade to the latest version of Phoenix is
required.
I don't know how much effort that would require, it *might* be as simple
as updating the dependencies in mix.exs as below:
defp deps do
[{:phoenix, "~> 1.2.1"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_html, "~> 2.6"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"}]
end
Then run:
mix deps.update --all
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA2vK_zHw9YDBvxVDpahZ8kHSPuDYMC8ks5sHts5gaJpZM4OEuuh>
.
|
The web app is running but the react code is not transpiling into an App.js file. I was looking for a "script" section in the package.json but did not see any. I did not see anything about that in the README. |
You'll need to run manually Webpack to transpile the JavaScript code: webpack --watch --color Make sure you have installed the npm packages first: |
@paulewetzel Feel free to send me a pull request with the changes you made to get it working. That'll help out future users! Also, if you're interested in building CQRS/ES apps in Elixir using Phoenix then you might enjoy the book I'm authoring: Building Conduit. |
Let me know when your book is 80%. I was about to start writing a distributed service bus the other day, but then came to my senses. I just finished up a sustained deep dive into redux and react. During that time I had an epiphany about functional programming and decided I would throw out the rails back end I was writing and rewrite it in Elixir. So I will be doing a lot of crash coursing on elixir and phoenix for the next month or so. |
Take a look at Elm, and the Elm architecture if you want full front-to-back functional programming. Elm provided part of the inspiration for Redux. The docs are worth a read through, even if you don't consider using the language. |
Have you used elm on big projects? I played with it a bit and liked it, I have to say though, JSX is a little easier on the eyes than nested arrays. If you have used both on nontrivial projects, would love to hear some feedback about the pros and cons of both in your experience. |
I enjoyed writing Elm thanks to its helpful compiler, elm-format for consistency, and following The Elm Architecture. You can be confident that when it compiles, it will usually work. I did not enjoy the integration of Elm code with JavaScript libraries and the back end, via JSON. It felt like I was forced to write lots of boring, repetitive code to act as the "border guard" between Elm and outside world. There's even an eBook dedicated to just this subject: The JSON Survival Kit by Brian Hicks. I'm also not exactly sure how best to scale up an Elm application as it grows in size. I need to invest more time reading, learning, and experimenting. There are also issues using the official Elm Web Sockets package and Phoenix that are a concern. As is the fact that there aren't yet many Elm packages, such as date picker controls. You end up using an JavaScript library and writing more Elm/JavaScript interop code ("ports") or write your own Elm widgets. I don't have any real feedback on React/Redux except that if I was using React then I would also use Redux. I may be one of the minority of developers who enjoy using JSX! |
Just started playing around with elixir recently, not sure what this compile time error means. I am able to create and run phoenix apps using mix without any issues:
web mix phoenix.server
[info] Running Web.Endpoint with Cowboy using http://localhost:4000
I am running Ubuntu 16.04 with Elixir 1.4.5, please see the error info below:
➜ phoenix-react-redux-example git:(master) ✗ mix phoenix.server
warning: variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name
mix.exs:12
Compiling 11 files (.ex)
== Compilation error on file web/router.ex ==
** (CompileError) web/router.ex: internal error in core;
crash reason: badarg
in function erl_anno:anno_info/1
called as erl_anno:anno_info(-1)
in call from v3_core:record_anno/2 (v3_core.erl, line 2565)
in call from v3_core:expr/2 (v3_core.erl, line 576)
in call from v3_core:safe/2 (v3_core.erl, line 1719)
in call from v3_core:expr/2 (v3_core.erl, line 565)
in call from v3_core:safe/2 (v3_core.erl, line 1719)
in call from v3_core:'-safe_list/2-anonymous-0-'/2 (v3_core.erl, line 1734)
in call from lists:foldr/3 (lists.erl, line 1276)
in call from v3_core:expr/2 (v3_core.erl, line 575)
in call from v3_core:safe/2 (v3_core.erl, line 1719)
in call from v3_core:'-safe_list/2-anonymous-0-'/2 (v3_core.erl, line 1734)
in call from lists:foldr/3 (lists.erl, line 1276)
in call from v3_core:expr/2 (v3_core.erl, line 575)
in call from v3_core:safe/2 (v3_core.erl, line 1719)
in call from v3_core:expr/2 (v3_core.erl, line 565)
in call from v3_core:safe/2 (v3_core.erl, line 1719)
in call from v3_core:'-safe_list/2-anonymous-0-'/2 (v3_core.erl, line 1734)
in call from lists:foldr/3 (lists.erl, line 1276)
in call from v3_core:expr/2 (v3_core.erl, line 691)
in call from v3_core:exprs/2 (v3_core.erl, line 549)
(stdlib) lists.erl:1338: :lists.foreach/2
(phoenix) expanding macro: Phoenix.Router.before_compile/1
web/router.ex:1: PhoenixReactReduxExample.Router (module)
(elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
The text was updated successfully, but these errors were encountered: