Comments (21)
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.
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.
I have the same issue still. Why is it closed?
from lamejs.
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.
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.
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.
Also having the same issue with sveltekit, waiting for PR to be merged and new version deployed
from lamejs.
I'm still having to make these manual changes despite using 1.2.1.
from lamejs.
from lamejs.
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.
Any update on this conversation guys ? I have the same issue
from lamejs.
same issue too
from lamejs.
still
from lamejs.
Try audio-encoder npm . works.
from lamejs.
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.
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 needvar MPEGMode = require('./MPEGMode.js');
BitStream.js:33
Presets.js:18
both needvar Lame = require('./Lame.js');
QuantizePVT.js:54
needsvar BitStream = require('./BitStream.js');
from lamejs.
@viniciusgusmao it doesn't work for me :(
from lamejs.
@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.
@TVNielsen Im using lamejs directly
from lamejs.
from lamejs.
@viniciusgusmao it doesn't work for me :(
have you done npm install
after changing package.json
?
from lamejs.
Related Issues (20)
- lamejs not working with angular 8 -- Uncaught ReferenceError: Lame is not defined HOT 3
- Silent MP3 file when converting output from Azure Speech-to-Text javascript SDK HOT 2
- Is it possible to use VBR (variable bit rate) HOT 1
- Blob to MP3 HOT 1
- lamejs.WavHeader.readHeader - Uncaught (in promise) TypeError: Cannot read property 'dataOffset' of undefined HOT 3
- There is a problem with the sound quality in the node environment
- Deleted
- recorder wavdata to mp3 causes ui rendering block HOT 2
- window not defined
- [Firefox] Data from right channel is not passed to encoder despite there are expected two channels
- MPEGMode is not defined HOT 5
- No sound in trimmed & encoded audio blob, Vue 2. Why?
- wav转mp3的时候lampjs报"ReferenceError: MPEGMode is not defined" HOT 10
- Cannot read properties of undefined (reading 'println') HOT 1
- can i convert amr to mp3?
- License clarification
- zhuker/lamejs 打包报错 HOT 1
- Why does this code work on Firefox not on Chromium?
- Maintainer needed?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lamejs.