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

Install Node/NPM in docker dev environment #2855

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

lunkwill42
Copy link
Member

We are working on replacing SASS compilation (and later JS bundling) with webpack, which will require Node and NPM. This change adds these tools to the Docker-based development environment so everything can be built there.

This is needed for #2849 to be completed.

We are working on replacing SASS compilation (and later JS bundling)
with webpack, which will require Node and NPM.  This change adds these
tools to the Docker-based development environment so everything can
be built there.
@lunkwill42 lunkwill42 requested a review from podliashanyk March 1, 2024 10:43
@lunkwill42 lunkwill42 self-assigned this Mar 1, 2024
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.16%. Comparing base (127ce87) to head (950d514).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2855   +/-   ##
=======================================
  Coverage   57.16%   57.16%           
=======================================
  Files         568      568           
  Lines       41293    41293           
=======================================
  Hits        23607    23607           
  Misses      17686    17686           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Mar 1, 2024

Test results

     12 files       12 suites   11m 47s ⏱️
3 312 tests 3 312 ✔️ 0 💤 0
9 411 runs  9 411 ✔️ 0 💤 0

Results for commit 950d514.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@podliashanyk podliashanyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! 🙌

Copy link
Contributor

@podliashanyk podliashanyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After rebasing #2849 onto this branch, and testing npm commands, I get /bin/sh: 1: npm: not found after all. So something is off with Node.js in the image

@lunkwill42
Copy link
Member Author

After rebasing #2849 onto this branch, and testing npm commands, I get /bin/sh: 1: npm: not found after all. So something is off with Node.js in the image

Not reproducible for me. Are you sure you remembered to run docker compose build after importing the changes from this PR, @podliashanyk ?

The deb.nodesource.com archives only publish NodeJS packages for the
amd64 architecture.  Attempting to build this Dockerfile on a Apple
silicon Mac (aarch64 architecture) will result in an image that pulls
the incorrect version of `nodejs` from deb.debian.org instead.
Copy link

sonarqubecloud bot commented Mar 4, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@lunkwill42
Copy link
Member Author

After rebasing #2849 onto this branch, and testing npm commands, I get /bin/sh: 1: npm: not found after all. So something is off with Node.js in the image

Not reproducible for me. Are you sure you remembered to run docker compose build after importing the changes from this PR, @podliashanyk ?

Turns out @podliashanyk is on a Mac with an M2 chip, and the deb.nodesource.com archives do not publish NodeJS packages for this platform. Added 950d514 to deal with this.

@lunkwill42 lunkwill42 requested a review from podliashanyk March 4, 2024 10:47
Copy link
Contributor

@podliashanyk podliashanyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great now 🙌

@lunkwill42 lunkwill42 merged commit 6e728fc into Uninett:master Mar 7, 2024
12 checks passed
@lunkwill42 lunkwill42 deleted the dev/node-in-docker branch March 7, 2024 10:05
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

Successfully merging this pull request may close these issues.

2 participants