我正在尝试将 webpack-encore 与 symfony 一起使用,但遇到问题。首先我用composer安装了webpack-encore:
composer require symfony/webpack-encore-bundle
yarn install
当我尝试运行 encore 时:
node node_modules/.bin/encore production
我收到此错误:
C:\wamp64\www\symfony1\node_modules\.bin\encore:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:1
0)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_ma
in.js:71:12)
at internal/main/run_main_module.js:17:47
我的操作系统是Windows 10,我相信Windows中的路径有问题,但我不知道如何解决这个问题。有人能帮我吗?
哈士奇WWW