Closed kevmodrome closed 4 years ago
What does your mix.exs
file look like?
This is my mix.exs file:
defmodule Svelterender.MixProject do
use Mix.Project
def project do
[
app: :svelterender,
version: "0.1.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps()
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {Svelterender.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:phoenix, "~> 1.4.15"},
{:phoenix_pubsub, "~> 1.1"},
{:phoenix_ecto, "~> 4.0"},
{:ecto_sql, "~> 3.1"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 2.11"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:gettext, "~> 0.11"},
{:jason, "~> 1.0"},
{:plug_cowboy, "~> 2.0"},
{:svelte_render, "~> 0.1.0"}
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to create, migrate and run the seeds file at once:
#
# $ mix ecto.setup
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test"]
]
end
end
Could you maybe give me access to your repo and I’ll take a look for you?
Of course!
I got the following error on mix ecto.setup
:
[error] beam/beam_load.c(1433): Error loading module 'Elixir.SvelteRender':
BEAM file exists but it defines a module named Elixir.Svelterender
I think the issue might just be a namespace clash, because the app has the same name as the package.
Yeah, this seems to have been it. Did not realize they weren't case-sensitive. Really sorry for wasting your time. Thanks a million for this though! I owe you one.
Not a problem at all. Just glad to see more people using Elixir and Svelte.js, I'm a really big fan of these technologies.
Hi! I've been trying to get this working but I keep getting stuck on this one issue that keeps coming up. As soon as I add
SvelteRender
I get this error about the module not existing.The problem is most likely that I am a total newbie when it comes to Elixir and Phoenix and i'm way over my head and I don't know how to correctly import the module. I assume this is the important part of the error message:
(UndefinedFunctionError) function SvelteRender.start_link/1 is undefined (module SvelteRender is not available)
I followed the instructions as far as I can tell. Does
Add SvelteRender to your Supervisor as a child
also imply that I have to import SvelteRender somehow?