且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Symfony2 Assetic:无法解析节点可执行文件的路径

更新时间:2023-11-19 21:11:10

首先确保你已经安装了 node 并找到 node 的路径.您通常可以通过使用 which node 来找到它,它会返回类似 /usr/local/bin/node 的内容.如果它返回类似 /usr/bin/which: no node in ... 你需要安装 node.

First make sure you have node installed and find the path to node. You can usually find this by using which node which will return something like /usr/local/bin/node. If it returns something like /usr/bin/which: no node in ... you need to install node.

接下来配置symfony.打开您的 config.yml (./app/config/config.yml) 和资产配置的节点路径,即:

Next configure symfony. Open your config.yml (./app/config/config.yml) and the path to node to you assetic config, i.e.:

# app/config/config.yml
assetic:
    node: /usr/local/bin/node