GithubHelp home page GithubHelp logo

Comments (21)

isolin avatar isolin commented on June 24, 2024 13

Hi Don, same here! The previous fix unfortunately caused some issues with modules relying on implicitly & improperly loaded submodules. The following changes fix at least my pipeline, I hope yours as well. Until there is a new version out, you need to edit the respective files in your node_modules/lamejs folder. After the filename I give the line number to insert the requirement.

Lame.js:29
Encoder.js:112
PsyModel.js:162
all need var MPEGMode = require('./MPEGMode.js');

BitStream.js:33
Presets.js:18
both need var Lame = require('./Lame.js');

QuantizePVT.js:54
needs var BitStream = require('./BitStream.js');

from lamejs.

jgentes avatar jgentes commented on June 24, 2024 10

The issue is fixed in the latest release on Github, just not on NPM apparently. You can use this as a workaround in your package.json:

"dependencies": {
    "lamejs": "github:zhuker/lamejs"
}

from lamejs.

MrAlekhin avatar MrAlekhin commented on June 24, 2024 7

I have the same issue still. Why is it closed?

from lamejs.

vanphucLE avatar vanphucLE commented on June 24, 2024 6

Declaring global variables can help:

import MPEGMode from 'lamejs/src/js/MPEGMode';
import Lame from 'lamejs/src/js/Lame';
import BitStream from 'lamejs/src/js/BitStream';


window.MPEGMode = MPEGMode;
window.Lame = Lame;
window.BitStream = BitStream;

from lamejs.

spicemix avatar spicemix commented on June 24, 2024 5

I was using this approach to linking with unreleased deps for a while and it was working, but at the moment for me neither that approach nor direct linking to 1.2.1 works. This issue shouldn't have been closed yet; we need a working release thanks!

(BTW, I found that unlinking on both ends and re-linking did the trick, but a new release would be so much easier)

from lamejs.

viniciusgusmao avatar viniciusgusmao commented on June 24, 2024 5

The issue is fixed in the latest release on Github, just not on NPM apparently. You can use this as a workaround in your package.json:

"dependencies": {
    "lamejs": "github:zhuker/lamejs"
}

Great! Worked for me.

from lamejs.

Specy avatar Specy commented on June 24, 2024 3

Also having the same issue with sveltekit, waiting for PR to be merged and new version deployed

from lamejs.

tommy-banana avatar tommy-banana commented on June 24, 2024 3

I'm still having to make these manual changes despite using 1.2.1.

from lamejs.

tommy-banana avatar tommy-banana commented on June 24, 2024 2

from lamejs.

Selithrarion avatar Selithrarion commented on June 24, 2024 1

Try audio-encoder npm . works.

it seems audio-encoder uses lamejs and i have the same err ;(
just copied their example to my app
Selithrarion/vue_audio-tools@391fd2f

from lamejs.

T0914 avatar T0914 commented on June 24, 2024

Any update on this conversation guys ? I have the same issue

from lamejs.

dadodasyra avatar dadodasyra commented on June 24, 2024

same issue too

from lamejs.

Selithrarion avatar Selithrarion commented on June 24, 2024

still

from lamejs.

tommy-banana avatar tommy-banana commented on June 24, 2024

Try audio-encoder npm . works.

from lamejs.

wug-ge avatar wug-ge commented on June 24, 2024

It's pretty dirty, but this repo fixed it for me if you don't want to manually each time:
https://www.npmjs.com/package/lamejstmp

It's dirty as hell of course, I hope this gets resolved.

Also, this repo might do what most people want with less boilerplate, it has lamejs bundled into it and doesn't suffer from this issue:
https://github.com/closeio/mic-recorder-to-mp3

from lamejs.

Digglit avatar Digglit commented on June 24, 2024

Is there something I'm missing about this? The issue has been closed for a while, but I am still experiencing the same problem. This fix works, when can it be expected to be included in production?

Hi Don, same here! The previous fix unfortunately caused some issues with modules relying on implicitly & improperly loaded submodules. The following changes fix at least my pipeline, I hope yours as well. Until there is a new version out, you need to edit the respective files in your node_modules/lamejs folder. After the filename I give the line number to insert the requirement.

Lame.js:29 Encoder.js:112 PsyModel.js:162 all need var MPEGMode = require('./MPEGMode.js');

BitStream.js:33 Presets.js:18 both need var Lame = require('./Lame.js');

QuantizePVT.js:54 needs var BitStream = require('./BitStream.js');

from lamejs.

KhoaTheBest avatar KhoaTheBest commented on June 24, 2024

@viniciusgusmao it doesn't work for me :(

from lamejs.

TVNielsen avatar TVNielsen commented on June 24, 2024

@viniciusgusmao it doesn't work for me :(

could be you're using mic-recorder like i was and this one carries a 3 year old version of lamejs which you will have to manually override, even with this solve from @jgentes
at least i did, although it somewhat contradicts my understanding of it having lamejs as a dependency, here's sharing hope you can use it to solve your issue too

from lamejs.

KhoaTheBest avatar KhoaTheBest commented on June 24, 2024

@TVNielsen Im using lamejs directly

from lamejs.

TVNielsen avatar TVNielsen commented on June 24, 2024

from lamejs.

digiage avatar digiage commented on June 24, 2024

@viniciusgusmao it doesn't work for me :(

have you done npm install after changing package.json ?

from lamejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.