Uncaught ReferenceError: Lame is not defined
bsidoruk opened this issue · comments
I have this library as a dependency in an Electron app. If I serve the app using a local server it works fine, however if I build the app I get the error Uncaught ReferenceError: Lame is not defined
when I launch it. This seems related to #58, however that doesn't seem to have really been resolved.
here is a sample project that works for me
package.json
{
"name": "myproj",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"lamejs": "1.2.0"
}
}
index.js
lame = require("lamejs")
encoder = new lame.Mp3Encoder(1, 48000,128)
console.log(encoder)
i run
npm install
node index.js
expected output:
Mp3Encoder { encodeBuffer: [Function], flush: [Function] }
let me know if it works for you
if it does - look into your build system
@bsidoruk I have the same problem... Did you resolve problem?
same problem here
@eibens do you have steps to reproduce?
that would make me more confident about merging
@zhuker Hi, thanks for the quick reply. See this repository. The readme contains more info.
@zhuker Hi, thanks for the quick reply. See this repository. The readme contains more info.
merged #59
creating a new npm release
Amazing! Thanks so much for resolving this so quickly.