Ous*_*ane 5 heroku symfony npm yarnpkg webpack-encore
我在我的 Symfony heroku 应用程序中添加了一个 heroku/nodejs buildpack,并且我能够安装我的纱线依赖项。
但是我无法运行
$ yarn run encore production
Run Code Online (Sandbox Code Playgroud)
Command "encore" not found无论我在 composer.json 中运行命令,我总是有同样的错误:
// composer.json
"compile": [
"node_modules/.bin/encore production",
[•••]
Run Code Online (Sandbox Code Playgroud)
或在 package.json
//package.json
"scripts": {
"heroku-postbuild" : "yarn run encore production"
[•••]
Run Code Online (Sandbox Code Playgroud)
小智 5
在您的 package.json 根文件中:
Run Code Online (Sandbox Code Playgroud)"scripts": { ... "heroku-postbuild" : "node_modules/.bin/encore production" }它将运行您的 webpack encore 并运行您的其他 npm 模块。
| 归档时间: |
|
| 查看次数: |
1153 次 |
| 最近记录: |