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

[ERROR] Invalid option in build() call: "watch" #154

Open
SamuelBonilla opened this issue Nov 12, 2024 · 0 comments
Open

[ERROR] Invalid option in build() call: "watch" #154

SamuelBonilla opened this issue Nov 12, 2024 · 0 comments

Comments

@SamuelBonilla
Copy link

I'm carefully following each step, but in some Phoenix projects, we don't have a package.json, so I copied and pasted the JSON from the example project (it would be helpful to add this to the documentation). Since package.json isn't generated automatically, after running mix phx.server, I get this error.

Node.js v20.14.0

Rebuilding...

Done in 168ms.
[error] Task #PID<0.618.0> started from Demo3Web.Endpoint terminating
** (stop) :watcher_command_error
    (phoenix 1.7.14) lib/phoenix/endpoint/watcher.ex:55: Phoenix.Endpoint.Watcher.watch/2
    (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
Function: &Phoenix.Endpoint.Watcher.watch/2
    Args: ["node", ["build.js", "--watch", {:cd, "/Users/username/dev/elixir/demo3/assets"}]]
✘ [ERROR] Invalid option in build() call: "watch"

    /Users/username/dev/elixir/demo3/assets/node_modules/esbuild/lib/main.js:253:12:
      253 │       throw new Error(`Invalid option ${where}: ${quote(key)}`);
          ╵             ^

    at checkForInvalidFlags (/Users/username/dev/elixir/demo3/assets/node_modules/esbuild/lib/main.js:253:13)
    at flagsForBuildOptions (/Users/username/dev/elixir/demo3/assets/node_modules/esbuild/lib/main.js:426:3)
    at buildOrContextContinue (/Users/username/dev/elixir/demo3/assets/node_modules/esbuild/lib/main.js:913:9)
    at /Users/username/dev/elixir/demo3/assets/node_modules/esbuild/lib/main.js:887:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

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

1 participant