Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 使用grunt编译less时内存问题_Node.js_Twitter Bootstrap_Gruntjs_Bower - Fatal编程技术网

Node.js 使用grunt编译less时内存问题

Node.js 使用grunt编译less时内存问题,node.js,twitter-bootstrap,gruntjs,bower,Node.js,Twitter Bootstrap,Gruntjs,Bower,我目前正在使用bower+grunt建立我的网站 bower.json中的依赖项 "dependencies": { "jquery": "~2.1.3", "bootstrap": "~3.3.2", "admin-lte": "~2.0.0" }, "dependencies": { "grunt": "^0.4.5", "grunt-bower-concat": "^0.4.0" }, "devDependencies": {

我目前正在使用bower+grunt建立我的网站

bower.json中的依赖项

  "dependencies": {
    "jquery": "~2.1.3",
    "bootstrap": "~3.3.2",
    "admin-lte": "~2.0.0"
  },
  "dependencies": {
    "grunt": "^0.4.5",
    "grunt-bower-concat": "^0.4.0"
  },
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-contrib-concat": "^0.5.1",
    "grunt-contrib-copy": "^0.7.0",
    "grunt-contrib-cssmin": "^0.12.2",
    "grunt-contrib-less": "^1.0.0",
    "grunt-contrib-uglify": "^0.7.0",
    "grunt-contrib-watch": "^0.6.1",
    "grunt-filerev": "^2.2.0",
    "grunt-usemin": "^3.0.0"
  },
my
package.json中的依赖项:

  "dependencies": {
    "jquery": "~2.1.3",
    "bootstrap": "~3.3.2",
    "admin-lte": "~2.0.0"
  },
  "dependencies": {
    "grunt": "^0.4.5",
    "grunt-bower-concat": "^0.4.0"
  },
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-contrib-concat": "^0.5.1",
    "grunt-contrib-copy": "^0.7.0",
    "grunt-contrib-cssmin": "^0.12.2",
    "grunt-contrib-less": "^1.0.0",
    "grunt-contrib-uglify": "^0.7.0",
    "grunt-contrib-watch": "^0.6.1",
    "grunt-filerev": "^2.2.0",
    "grunt-usemin": "^3.0.0"
  },
我使用的是
AdminLTE 1.4.*
,一切都很好。我更新到
AdminLTE 2.0.0
,当我尝试编译我的less文件时,我收到以下错误:

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
我有我的
base.less
文件,其中只包含
bootstrap
ad
Adminlte
样式表。 如果我从导入的
adminlte.less
文件(引导变量、mixin和所有皮肤)中排除了一些文件,它编译时不会出错,但我也需要导入皮肤:)


如何修复它?

我解决了这个问题,在AdminLTE.less中注释了这些行:

@import "../bootstrap-less/mixins.less";
@import "../bootstrap-less/variables.less";
在我使用的皮肤文件中也做了同样的事情:

/*
 * Skin: Blue
 * ----------
 */
//@import "../../bootstrap-less/mixins.less";
//@import "../../bootstrap-less/variables.less";

希望有帮助

这看起来不是一个好的解决方案,因为它“只是”注释代码。注释这些行之后,less文件是如何编译的?