2015-02-02 4 views
7

Windows 플랫폼을 사용하고 있습니다. 제발 웃지 마세요. 그리고 Windows 7을 실행하는 내 로컬 머신에서 asseti를 사용하여 Symfony2 프로젝트를 만들려고합니다.Windows 7을 사용하는 Symfony2 프로젝트에 대한 assetic을 덤프 할 때 런타임 예외가 발생했습니다.

이제 내성적 인 파일을 버리지 않는 이유를 알아낼 수 없습니다. 항상 RunTime Exception을 말하는 것입니다. 커피 빈과 노드 경로와 관련이 있다고 생각합니다. 이것은 커피 빈과 노드의 경로를 설정하는 올바른 방법입니까?

php app/console asset:install

framework: 
    [...] 


# Twig Configuration 
twig: 
    [...] 

# Assetic Configuration 
assetic: 
    debug:   "%kernel.debug%" 
    use_controller: true 
    bundles: [...] 


    filters: 
     sass: 
      load_paths: [ "%kernel.root_dir%/../src/xxxxx/WebsiteBundle/Resources/public/vendor/" ] 
      compass: true 
     coffee: 
      bin: C:\Users\xxxxx\AppData\Roaming\npm\coffee 
      node: C:\Program Files\nodejs\node 
     cssrewrite: ~ 


# Doctrine Configuration 
[...] 

php composer.phar 설치 작품

php app/console assetic:dump

나에게 다음과 같은 오류 제공 잘 작동 :

[RuntimeException]

Unable to write file C:/xampp/htdocs/xxxxx/app/../web/js/3b27a3f_js?key=AIzaSyCk9Cxgv09X9DKar1bcsLAXxlqP3YhF0OI_1.js

내 첫 느낌입니다 커피 빈 노드 경로에 문제가 .

다음은 내 컴퓨터에있는 곳입니다.

enter image description here

enter image description here

은 무슨 일인지 모른다. 이 문제를 해결하는 데 도움이 될만한 결과를 덤프 해 드리겠습니다. 나는 여기에 우둔한 느낌. 나는 노드와 정확히 같은 문제가 있었다이

coffee: 
    bin: "C:\\Users\\xxxxx\\AppData\\Roaming\\npm\\coffee" 
    node: "C:\\Program Files\\nodejs\\node" 

시도 등

+0

나는 (I 창문이없는 나의 동료,'관리자 권한으로 cmd'를 실행하려고 최근에 비슷한 문제가 있다고 생각) –

+0

Windows에서 관리자로 실행하고 있습니다. 효과가 없습니다. –

+0

오류 메시지를 복사하여 복사하여 복사 할 수 있습니까? Symfony2가 올바른 파일명이 아닌'.../3b27a3f_js? key = AIzaSyC ...'파일을 만들려고 할 때 오류가 발생합니다. –

답변

4

통합

1 파일 config.yml

# Assetic Configuration 
assetic: 
    debug:   "%kernel.debug%" 
    use_controller: false 
    bundles:  [ ] 
    #java: /usr/bin/java 
    filters: 
     cssrewrite: ~ 
    less: 
     node: "C:\\Program Files (x86)\\nodejs\\node.exe" 
     node_paths: ["C:\\Users\\websky\\AppData\\Roaming\\npm\\node_modules"] 
     apply_to: "\.less$" 
    yui_css: 
     jar: %kernel.root_dir%/../java/yuicompressor-2.4.6.jar 
    yui_js: 
     jar: %kernel.root_dir%/../java/yuicompressor-2.4.6.jar 
     #closure: 
     # jar: "%kernel.root_dir%/Resources/java/compiler.jar" 

2. 파일 base.html.twig

<head> 
     {% stylesheets filter='less,?yui_css' '@AcmeBundle/Resources/less/main.less' %} 
     <link href="{{ asset_url }}" rel="stylesheet" media="screen" /> 
     {% endstylesheets %} 
    </head> 
assetic

php app/console assetic:dump --env=prod 

유용한 링크를 구축

3. : Less Windows Node.js Hanging

0

SASS, 나침반, 커피를 사용하고 있습니다. 이 작동하지 않으면 정확한 .exe 경로를 가리키는보십시오. Windows에는 모든 종류의 문제가있는 것 같습니다. Symfony2 및 Assetic의

행운

+0

안녕 nodejs exe 파일을 가리 켰나요? –

+0

나는 이것을 시도했지만 작동하지 않았다. –

+0

네, 작동하지 않는다면 .exe – DevDonkey