Skip to content

Correctly install optional native dependencies#1321

Merged
Arnei merged 1 commit intoopencast:developfrom
JulianKniephoff:fix-native-dependencies
Jun 12, 2025
Merged

Correctly install optional native dependencies#1321
Arnei merged 1 commit intoopencast:developfrom
JulianKniephoff:fix-native-dependencies

Conversation

@JulianKniephoff
Copy link
Copy Markdown
Member

@JulianKniephoff JulianKniephoff commented Jun 4, 2025

See #1320 for a description of the problem.

To fix it while causing minimal disruption to our package-lock.json, I did the following:

  • Run

    npm i -D @swc/core@1.11.24 rollup@4.40.2 esbuild@0.25.0 @parcel/watcher@2.5.0

    This installs (and saves to package.json under devDependencies) all the dependencies we have that have optional native transitive dependencies. The versions are the versions we currently have, so as to not update anything in the process.

  • Run

    git restore package.json
    npm i

    We actually don't want these transitive deps as direct deps; we just wanted npm to update package-lock.json, which should have happened now.

Hopefully fixes #1320.

See opencast#1320 for a description of the problem.

To fix it while causing minimal disruption to our `package-lock.json`,
I did the following:

- Run

  ```sh
  npm i -D @swc/core@1.11.24 rollup@4.40.2 esbuild@0.25.0 @parcel/watcher@2.5.0
  ```

  This installs (and saves to `package.json` under `devDependencies`)
  all the dependencies we have that have optional native transitive dependencies.
  The versions are the versions we currently have,
  so as to not update anything in the process.
- Run

  ```sh
  git restore package.json
  npm i
  ```

  We actually don't want these transitive deps as direct deps;
  we just wanted `npm` to update `package-lock.json`,
  which should have happened now.

Hopefully fixes opencast#1320.
@JulianKniephoff JulianKniephoff added type:dependencies Pull requests that update a dependency file type:infrastructure Build process, deployment, workflows labels Jun 4, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2025

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-1321

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-1321

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2025

This pull request is deployed at test.admin-interface.opencast.org/1321/2025-06-04_12-05-07/ .
It might take a few minutes for it to become available.

Copy link
Copy Markdown
Member

@Arnei Arnei left a comment

Choose a reason for hiding this comment

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

Works on my Intel Dell. I have no way to test if this actually helps ARM Macs.

@Arnei Arnei merged commit 6c26ae1 into opencast:develop Jun 12, 2025
8 checks passed
@JulianKniephoff JulianKniephoff deleted the fix-native-dependencies branch June 16, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:dependencies Pull requests that update a dependency file type:infrastructure Build process, deployment, workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross platform build

2 participants