gpt4 book ai didi

node.js - 使用 grunt 编译时的内存问题

转载 作者:搜寻专家 更新时间:2023-10-31 23:17:40 25 4
gpt4 key购买 nike

我目前正在使用 bower + grunt 来构建我的网站。

bower.json 中的依赖项:

  "dependencies": {
"jquery": "~2.1.3",
"bootstrap": "~3.3.2",
"admin-lte": "~2.0.0"
},

我的 package.json 中的依赖项:

  "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 文件只包含 bootstrapAdminlte 样式表。如果我从 adminlte.less 文件的导入中排除一些文件( Bootstrap 变量和混合以及所有皮肤)它编译没有错误,但我也需要导入皮肤 :)

我该如何解决?

最佳答案

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

@import "../bootstrap-less/mixins.less";
@import "../bootstrap-less/variables.less";

并且在我使用的皮肤文件中做了同样的事情:

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

希望对你有帮助

关于node.js - 使用 grunt 编译时的内存问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28724107/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com