ammy
Couldn't resolve phoenix framework - [ERROR] Cannot read directory "../..": operation not permitted
while I try to give the command (mix phx.server) in the vs code terminal
I am getting some errors.
You can mark the path "phoenix_live_view" as external to exclude it from the bundle, which will remove this error.
5 errors
[watch] build finished
[watch] build started (change: "../..")
✘ [ERROR] Cannot read directory "../..": operation not permitted
✘ [ERROR] Could not resolve "bootstrap"
js/app.js:4:7:
4 │ import "bootstrap"
╵ ~~~~~~~~~~~
You can mark the path "bootstrap" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "phoenix_html"
js/app.js:23:7:
23 │ import "phoenix_html"
╵ ~~~~~~~~~~~~~~
You can mark the path "phoenix_html" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "phoenix"
js/app.js:25:21:
25 │ import {Socket} from "phoenix"
╵ ~~~~~~~~~
You can mark the path "phoenix" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "phoenix_live_view"
js/app.js:26:25:
26 │ import {LiveSocket} from "phoenix_live_view"
╵ ~~~~~~~~~~~~~~~~~~~
You can mark the path "phoenix_live_view" as external to exclude it from the bundle, which will remove this error.
5 errors
[watch] build finished
[watch] build started (change: "../..")
✘ [ERROR] Cannot read directory "../..": operation not permitted
Most Liked
al2o3cr
It seems like the build tools aren’t finding a directory they’re supposed to - can you post the top part of your app.js, or wherever that ../.. path is coming from?
al2o3cr
General note: I’ve reformatted your post to use triple-backticks (```) for code formatting. This is especially important in this situation because otherwise Markdown converts .. to .. which is SUPER CONFUSING ![]()
I don’t think it’s related - but can you tell us more about whatever alternative CSS pipeline that’s being used here?
Back to your original question, I don’t see anything notably unexpected in your app.js which makes me suspect esbuild’s configuration. What does your configuration (generated in config/config.exs by default) look like? Here’s the version from the Phoenix generator:
That NODE_PATH bit at the end is critical - it makes lines like import "phoenix_html" work correctly. If it was misconfigured, you’d see exactly the errors you are currently seeing.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









