Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught AssertionError: path must be a string error in Require.js

I'm getting the following error in my simple example using node-webkit:

Uncaught AssertionError: path must be a string

index.html

//base.js

require(["test"], function(test) {
    test.init();
});

//test.js

define(function(){
   window.c = window.console;
   return {
       init: function(){
           c.log('test.init');
       },

       destroy: function(){
           c.log('test.destroy');
       }
   }
});
like image 515
chovy Avatar asked Sep 18 '13 08:09

chovy


1 Answers

Looks like the new version of RequireJS has a function called: requirejs() in addition to require() to avoid conflicts with node's require().

like image 142
chovy Avatar answered Sep 29 '22 20:09

chovy