所以我的python web應用程序需要使用一些基於node.js工具的工具。當然我會把node_modules
放在我的.gitignore
中,我打算保持這種狀態。無論哪種方式,我需要添加另一個Heroku buildpack,很簡單。如何在Heroku:Python應用程序中設置node_modules目錄?
=== staging-application Buildpack URLs
1. heroku/nodejs
2. heroku/python
我那麼做了git push staging master
,但是Heroku的這個
App not compatible with buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz
我搜索周圍對此的答案,但很遠還沒有得到迴應。以下是一些可能有助於調查的文件。
這裏是我的procfile
# Procfile
web: sh heroku.sh
這裏是我的Heroku腳本
# heroku.sh
cd site
npm install postcss-cli
npm install autoprefixer
gunicorn run:app