Closed qfox closed 11 years ago
Provide more info please. At least full stacktrace.
How I can forse nodejs to write stacktrace?
$ bem --version 0.5.16
Micro example:
$ bem make bem-bl/
00:54:05.442 - info: bem 0.5.16
00:54:05.503 - info: Graph:
== root
all
build
FATAL ERROR: JS Allocation failed - process out of memory
But sh $ bem make bem-bl
works fine. Error: There is no such id in arch.nodes: bem-bl
Show your .bem/make.js
then.
.bem/make.js
var
LevelNode = require('bem/lib/nodes/level').LevelNode,
BundlesLevelNode = require('bem/lib/nodes/level').BundlesLevelNode,
basePaths = ['app/bemyeah']; //, 'module/bemyeah', 'core/bemyeah'],
qwepages = function () {
};
//console.log(PATH.resolve, LevelNode, BundlesLevelNode);
MAKE.decl('Arch', {
getLibraries: function() {
return {
'core/bem-bl': {
type: 'git',
url: 'git://github.com/bem/bem-bl.git'
}
};
},
// make custom level nodes
createBlocksLevelsNodes: function(parent, children) {
var nodeIds = [], that = this;
basePaths.forEach(function (v, k) {
// Create instance of LevelNode
var node = new LevelNode({
level: v+'/blocks'
});
// Add created node to arch tree
this.arch.setNode(node, parent, children);
// Push node id to result list
nodeIds.push(node.getId());
}, this);
// Returns list with ids of created nodes
return nodeIds;
},
// and pages/bundle nodes
createBundlesLevelsNodes: function(parent, children) {
var nodeIds = [];
basePaths.forEach(function (v, k) {
// Create instance of LevelNode
var node = new BundlesLevelNode({
level: v+'/pages'
});
// Add created node to arch tree
this.arch.setNode(node, parent, children);
// Push node id to result list
nodeIds.push(node.getId());
}, this);
// Возвращаем массив из идентификаторов созданных узлов
return nodeIds;
}
});
MAKE.decl('BundleNode', {
getTechs: function() {
return [
'bemjson.js',
'bemdecl.js',
'deps.js',
'bemhtml.js',
'css',
'js',
'html'
];
}
});
But I think it's not depend on it.
$ git clone git://github.com/bem/bem-bl.git bem-bl
$ bem make bem-bl/
02:45:41.355 - info: bem 0.5.16
02:45:41.454 - info: Graph:
== root
all
build
FATAL ERROR: JS Allocation failed - process out of memory
rofl:
$ bem make bem-bl//
02:47:23.947 - info: bem 0.5.16
02:47:24.047 - info: Graph:
== root
all
build
RangeError: Maximum call stack size exceeded
I think it's minor bug in path analizer.
It crashes with trailing slash
@zxqfox Don't use trailing slashes as a workaround. We'll fix that.
Sure not. I can't live without trailing slashes! ;-)
Fix is in master but not in 0.5.x
:+1: Could you release new fixed version, plz, I spent half a day trying to figure out where the bug is :(
on the go :)
After executing
$ bem make core/level/
... JS Allocation failedSeems like there is unlimited recursion somewhere.