Question

ok its gose like this i have this code:

var PMP_Abstract = new JS.Class({});
var PMP = new JS.Singleton(PMP_Abstract,{
    //on Application Start
    initialize: function() {
    }
});

in short here i want put the main logic but... this just defines,

now i have this error:

[Mon, 26 Mar 2012 08:09:01 GMT] INFO Creating 1 worker process.

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
TypeError: undefined is not a function
    at Object.<anonymous> (/Users/sivan/appTest/Testing/lib/PMP.js:1:82)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Module.require (module.js:354:17)
    at require (module.js:370:17)
    at Object.<anonymous> (/Users/sivan/appTest/Testing/app/controllers/main.js:20:1)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
[Mon, 26 Mar 2012 08:09:01 GMT] ERROR Worker 4442 died.

now how do i fixed this ?? like have not idea what this function its talking about...

Était-ce utile?

La solution

You are using JS.Class without referencing it.

In your console type npm install jsclass then change your file to read

require("jsclass");

var PMP_Abstract = new JS.Class({});
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top