DiegoUreno

DiegoUreno

I recently upgrade Phoenix from 1.5.12 to 1.6.2 but im getting an error everytime i tried to run the server.
This is the error.
`
mix phx.new test
cd test
mix ecto.create
mix phx.server
error: Cannot read directory “../../../../..”: operation not permitted

js/app.js:23:7: error: Could not resolve “phoenix_html” (mark it as external to exclude it from the bundle)
23 │ import “phoenix_html”
╵ ~~~~~~~~~~~~~~

js/app.js:25:21: error: Could not resolve “phoenix” (mark it as external to exclude it from the bundle)
25 │ import {Socket} from “phoenix”
╵ ~~~~~~~~~

js/app.js:26:25: error: Could not resolve “phoenix_live_view” (mark it as external to exclude it from the bundle)
26 │ import {LiveSocket} from “phoenix_live_view”
╵ ~~~~~~~~~~~~~~~~~~~

4 errors
`
I’ve tried giving “full disk access” to the terminal, but it doesn’t work out, I don’t know what to do.

Oh, and my versions are this:
Erlang/OTP 24 [erts-12.0.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [dtrace]

Elixir 1.12.2 (compiled with Erlang/OTP 24)

macOS Big Sur v11.6 M1

Showing Posts 1 to 6

derek-zhou

derek-zhou

maybe you have an older version of the generator. try:

mix archive.install hex phx_new
clearmind0202

clearmind0202

Are you running the phoenix app inside an umbrella?
I’ve stumbled upon the issue regarding JS imports this morning, and i could only reproduce it under the said condition.

sigu

sigu

I get this error when running inside an umbrella app, do you have a way around it?

craig

craig

Did anyone ever solve this issue? Happening to me inside an umbrella app. I’m running mix esbuild default --minify in the directory for the live view app under apps

japplegame

japplegame

I believe that the reason is the wrong path to the dependencies folder. In an umbrella application dependencies are not in the application folder, but in the root folder.
Try to change that path in config.exs of your phoenix application:

# Configure esbuild (the version is required)
config :esbuild,
  ...
    env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
  ...

change "../deps" to "../../../deps"

craig

craig

thanks @japplegame, this solved my issues

— All posts loaded —

Where Next? Top

Trending in Questions Top

Hellowman
Hello everyone! I am new to coding with Elixir/Erlang. And i am looking for some utilities for fuzzing testing like AFL++. Does anyone ...
New
yarrichar
I’m very new to Elixir, so sorry if this is a silly question: I am wondering what happens to the mailbox of a process when the machine i...
New
pragdave
How do I tell Hologram not to escape HTML when substituting into templates? {Textile.render(@product.long_description)} escapes the HTM...
New
Fl4m3Ph03n1x
Background When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error: * assembling mark...
New
mandar1045
I load tested a plain Phoenix chat app backed by Postgres with 100 million messages in it, everything on default settings, to see what br...
New
rlipscombe
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New
saleyn
Is there a way to import record definitions in the iex shell for pretty printing (similar to the rr command in the erl shell)? This woul...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews