erikba

Untitled

Nov 29th, 2011
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. ../../../../js.io/jsio_compile -vv Orbited2.pkg -j jsio-3.3alpha -o ../static/Orbited2.js -d
  2. (node) process.compile should not be used. Use require('vm').runInThisContext instead.
  3.  
  4. node.js:134
  5. throw e; // process.nextTick error, or 'error' event on first tick
  6. ^
  7. TypeError: Object function (path, moduleDef, opts) {
  8. opts = opts || {};
  9.  
  10. if (gSrcTable[moduleDef.path]) {
  11. moduleDef.src = '';
  12. return;
  13. }
  14.  
  15. logger.info('compiling', moduleDef.path);
  16.  
  17. // prevent double import
  18. gSrcTable[moduleDef.path] = true;
  19.  
  20. var self = moduleDef.path;
  21.  
  22. if (opts.path) {
  23. if (JS.isArray(opts.path)) {
  24. for (var i = 0, len = opts.path.length; i < len; ++i) {
  25. jsio.path.add(opts.path);
  26. }
  27. } else if (typeof opts.path == 'string') {
  28. jsio.path.add(opts.path);
  29. }
  30. }
  31.  
  32. if (opts.autoDetectPaths) {
  33. jsioAddPath.lastIndex = 0;
  34. logger.debug('detecting paths for', self);
  35. while (true) {
  36. var match = jsioAddPath.exec(moduleDef.src);
  37. if (!match) { break; }
  38. try {
  39. jsio.path.add(eval(match[1]));
  40. logger.info('added path ' + match[1]);
  41. } catch(e) {
  42. logger.info('failed to add path ' + match[1]);
  43. }
  44. }
  45. }
  46.  
  47. jsioNormal.lastIndex = 0;
  48. while (true) {
  49. var match = jsioNormal.exec(moduleDef.src);
  50. if (!match) { break; }
  51.  
  52. logger.debug('detected', match[0])
  53.  
  54. var cmd = match[1],
  55. inlineOpts = match[2] ? match[2].substring(1) : '';
  56.  
  57. try {
  58. cmd = eval(cmd);
  59. } catch(e) {
  60. logger.warn('could not compile import from', self + ':', cmd);
  61. continue;
  62. }
  63.  
  64. try {
  65. inlineOpts = eval(inlineOpts);
  66. } catch(e) {
  67. logger.warn('could not parse opts for jsio in', self + ':', inlineOpts);
  68. inlineOpts = {};
  69. }
  70.  
  71. run(moduleDef, cmd, opts, inlineOpts);
  72. }
  73.  
  74. jsioDynamic.lastIndex = 0;
  75. while(true) {
  76. var match = jsioDynamic.exec(moduleDef.src);
  77. if (!match) { break; }
  78.  
  79. var cmd = match[1],
  80. inlineOpts = match[2] || '';
  81.  
  82. if (opts.dynamicImports && cmd in opts.dynamicImports) {
  83. var dynamicImports = opts.dynamicImports[cmd];
  84. if (!dynamicImports) {
  85. logger.debug('Dynamic import ' + cmd + ': <nothing>');
  86. continue;
  87. } else if (JS.isArray(dynamicImports)) {
  88. for (var j = 0, line; line = dynamicImports[j]; ++j) {
  89. logger.debug('Dynamic import ' + cmd + ': ' + line);
  90. run(moduleDef, line, opts, inlineOpts);
  91. }
  92. } else {
  93. logger.debug('Dynamic import ' + cmd + ': ' + dynamicImports);
  94. run(moduleDef, dynamicImports, opts, inlineOpts);
  95. }
  96. } else {
  97. logger.error('Missing: import definition\nConstant', cmd, 'for DYNAMIC_IMPORT_' + cmd, ' was not provided to the compiler');
  98. }
  99. }
  100.  
  101. gSrcTable[moduleDef.path] = JS.shallowCopy(moduleDef);
  102. moduleDef.src = '';
  103. } has no method 'setDebugLevel'
  104. at Object.run (./compiler.js:6:214)
  105. at Object.init (./node_interface.js:2:332)
  106. at Object.start (./compiler.js:1:426)
  107. at Object.<anonymous> (/home/erikba/Projects/js.io/jsio_compile:83:26)
  108. at Module._compile (module.js:402:26)
  109. at Object..js (module.js:408:10)
  110. at Module.load (module.js:334:31)
  111. at Function._load (module.js:293:12)
  112. at Array.<anonymous> (module.js:421:10)
  113. at EventEmitter._tickCallback (node.js:126:26)
  114. make: *** [debug] Error 1
  115.  
  116.  
Advertisement
Add Comment
Please, Sign In to add comment