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

[axolotl-web] Replace git mic-recorder-to-mp3 npm dependency #877

Merged
merged 1 commit into from
Aug 28, 2022

Conversation

olof-nord
Copy link
Collaborator

@olof-nord olof-nord commented Aug 27, 2022

Instead of using a git repo as dependency, switch to the @jmd01/mic-recorder-to-mp3 fork:

"Forked due to the bundled dist (which includes lamejs src) throwing the error "LAME undefined" when bundling with esbuild."

This means we do not rely on a git repo source, but can use a library straight from the npm repository.

Unfortunately the fix introduced with #874 also did not work - it fails at a later point in the build with the following message:

[?25hnpm ERR! code ENOTCACHED
npm ERR! request to https://codeload.github.com/NikolaBalaban/mic-recorder-to-mp3/tar.gz/b07b6408c41cb55122169739e4bdce626660c109 failed: cache mode is 'only-if-cached' but no cached response is available.
npm ERR! A complete log of this run can be found in:
npm ERR!     /run/build/axolotl-electron-bundle/flatpak-node/npm-cache/_logs/2022-08-27T12_04_13_904Z-debug-0.log
make: *** [Makefile:82: build-dependencies-axolotl-web] Error 1
FB: host_command_exited_cb 3159151 512

This PR is related to issue #838

Instead of using a git repo as dependency, switch to the @jmd01/mic-recorder-to-mp3 fork:

"Forked due to the bundled dist (which includes lamejs src) throwing the error "LAME undefined" when bundling with esbuild."
@olof-nord
Copy link
Collaborator Author

olof-nord commented Aug 27, 2022

Reading the commit message, I understand that the original "mic-recorder-to-mp3" dependency had an outdated dist build.
Flatpak should, but seemingly does not, support git references for npm: as such I suggest to switch to a fork which has a published version to the npm registry.

If the fork from jmd01 is the best I do not know, it is however the only one which specifies a reason for the fork - many of the other published 2.2.3 versions are simply published without a message.

For the future, it might be worth thinking if we want to depend on a "dead" library: instead of switching to a fork, we should probably look into a completely different, maintained, library for this functionality.

@olof-nord olof-nord changed the title Replace git mic-recorder-to-mp3 dependency [axolotl-web] Replace git mic-recorder-to-mp3 npm dependency Aug 27, 2022
@olof-nord
Copy link
Collaborator Author

olof-nord commented Aug 28, 2022

I can confirm that this change allows for a Flatpak (and thus Flathub) release again 👍

@olof-nord olof-nord requested a review from nanu-c August 28, 2022 16:17
@olof-nord olof-nord merged commit 09a6712 into main Aug 28, 2022
@olof-nord olof-nord deleted the replace-git-mic-recorder-to-mp3-dependency branch August 28, 2022 22:07
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