ecto / duino

:bulb: Arduino framework for node.js
959 stars 214 forks source link

Define is not defined #29

Open finitud opened 12 years ago

finitud commented 12 years ago

Following the instructions I just keep getting a "define not defined" message. Example:

$ node examples/led.js
/Users/ruben/projects/arduino/noduino/node_modules/duino/lib/board.js:1
(function (exports, require, module, __filename, __dirname) { define(function(
                                                          ^
ReferenceError: define is not defined
    at Object.<anonymous> (/Users/ruben/projects/arduino/noduino/node_modules/duino/lib/board.js:1:63)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/Users/ruben/projects/arduino/noduino/node_modules/duino/index.js:3:11)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
rohanrehman commented 11 years ago

I am getting same error, did you figure this out?

tjanson commented 10 years ago

Try

if (typeof define !== 'function') {
  var define = require('amdefine')(module);
}

… Oh, this is way old. Well, maybe someone still has this issue.