我正在尝试配置symfony assetic manager来编译我的较少的css文件并重写路径,但是我得到了以下错误:
Dumping all dev assets.
Debug mode is on.
18:51:01 [file+] C:/htdocs/site-ideiah-symfony/app/../web/css/57b3454.css
[Assetic\Exception\FilterException]
An error occurred while running:
"C:\Users\Rafael\AppData\Local\Temp\ass1C74.tmp"
Error Output:
Access Denied我的config.yml
filters:
cssrewrite:
apply_to: '\.(css|less)$'
less:
node: [ "C:\\Program Files\\nodejs\\node.exe" ]
node_paths: [ "C:\\Program Files\\nodejs\\", "C:\\Program Files\\nodejs\\node_modules\\" ]
apply_to: "\.less$"我的模板使用情况
{% block stylesheets %}
{% stylesheets filter='less,cssrewrite'
'@IdeiahSiteAppBundle/Resources/public/less/style.less'
%}
<link href="{{ asset_url }}" type="text/css" rel="stylesheet" media="all" />
{% endstylesheets %}
{% endblock %}我使用的是Windows 8和PHP 5.4.7,有人知道我该如何修复它吗?
发布于 2014-11-14 23:53:14
我也遇到过类似的问题。移除Less并安装一个较旧的版本为我修复了它。其他解决方案之一似乎是将symfony升级到较新的版本,但我们无法做到这一点,因为我们必须使用与centos6.5兼容的旧版本symfony
这很有帮助:https://github.com/braincrafted/bootstrap-bundle/issues/217
发布于 2013-03-13 19:34:11
此安全问题可能与1)无法写入输出文件,2)无法读取输入文件,和/或3)无法执行node命令有关
1)运行assetic:dump命令的用户是否能够写入文件夹C:/htdocs/site-ideiah-symfony/web/css/和57b3454.css文件?
2)在Error Output:之后,assetic还应该显示使用的输入,如下所示:
Input:
/*!
* Bootstrap v2.3.1
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat
*/
// Core variables and mixins
@import "variables.less"; // Modify this for custom colors, font-sizes, etc
@import "mixins.less";
// CSS Reset
@import "reset.less";您是否看到列出了任何输入?
3)检查用户是否从命令行执行"C:\Program Files\nodejs\node.exe"
https://stackoverflow.com/questions/14326606
复制相似问题