mohayonao / timbre.js

JavaScript library for objective sound programming
http://mohayonao.github.io/timbre.js/
MIT License
962 stars 74 forks source link

npm module requires 'lame' module, but it's not listed as a depndency #18

Open thejsj opened 10 years ago

thejsj commented 10 years ago

When you try to require('timbre') it throws the following error.

Warning: Cannot find module 'lame' from '/Users/jorgesilva/Sites/2014/clickOnJorge/node_modules/timbre' Use --force to continue.

This seems to be because this package is not listed as a dependency in the package.json.

Should be as simple as:

npm install lame --save
mohayonao commented 10 years ago

'lame' support is optional. if lame is not installed, timbre.js is expected to ignore it.

https://github.com/mohayonao/timbre.js/blob/master/timbre.node.js#L64

var lame = (function() {
    try { return require("lame"); } catch (e) {}
})();

umm.. please tell me the detail of the error message.

fionnbharra commented 9 years ago

I have the same problem.

Error: Cannot find module 'lame' from '/node_modules/timbre'
data-doge commented 8 years ago

if yall are getting this error when using timbre.js with browserify, you can use browserify's --ignore-missing flag to skip the unresolved requires for lame, ogg, and vorbis

http://stackoverflow.com/questions/26127804/browserify-building-with-dependencies-that-have-require-statements-in-try-catch