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

Generated Dockerfile can't build assets installed with npm --save #5976

Open
mrkurt opened this issue Nov 15, 2024 · 0 comments
Open

Generated Dockerfile can't build assets installed with npm --save #5976

mrkurt opened this issue Nov 15, 2024 · 0 comments

Comments

@mrkurt
Copy link
Contributor

mrkurt commented Nov 15, 2024

Environment

  • Elixir version (elixir -v): Elixir 1.17.3 (compiled with Erlang/OTP 27)
  • Phoenix version (mix deps): 1.7.14
  • Operating system: MacOS, Docker, and Linux

Actual behavior

I've installed xterm.js with npm i @xterm/xterm --save (straight from the phoenix docs), which placed it in assets/node_modules as expected. When I import this in either my app.css or app.js it works as expected when running in development:

@import "@xterm/xterm";
import { Terminal } from '@xterm/xterm';

When I attempt to build this with Docker, however, it fails because .dockerignore includes this:

# Static artifacts - These should be fetched and built inside the Docker image
/assets/node_modules/

Expected behavior

I'd like my Dockerfile to build my assets properly when I follow the docs for adding using an npm.

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