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

I can't get the example code to run #3

Closed
michaelforrest opened this issue Aug 20, 2015 · 1 comment
Closed

I can't get the example code to run #3

michaelforrest opened this issue Aug 20, 2015 · 1 comment

Comments

@michaelforrest
Copy link

I do npm install shoutcast, then I create test.js with this content:

var cast = require('shoutcast');
var station = cast.Station(conf);

http.createServer(function (req, res) {
  station.connect(res, function() {
    console.log("Stream ended?");
  });
}).listen(7000);

station.start();

When I do node ./test.js I get

module.js:338
    throw err;
          ^
Error: Cannot find module 'shoutcast'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/mf/code/shoutcast/server.js:1:74)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)

I tried a different node module and that worked, so I don't think it's anything to do with my paths - could it be that shoutcast-node is using an old way of doing modules or something?

@michaelforrest
Copy link
Author

Okay I've hacked about a bit and got it sort of working but it turns out it doesn't do what I wanted really so I'll just close this down for now.

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

No branches or pull requests

1 participant