2
私は、反応を使用しているherokuノードアプリでpostgresアドオンを使用しようとしています。エラーが見つかりましたモジュールが見つかりません:herokuアプリで 'pg-native'
私はHerokuの内部で反応をサポートするために、これはbuildpackを反応させ使用しています: https://github.com/opike/create-react-app-buildpack.git
私は行を追加しようとすると:
var pg = require('pg');
私が実行しようとすると、私は次のコンパイルエラーが発生しますローカルHerokuのアプリ:
>heroku local web
[OKAY] Loaded ENV .env File as KEY=VALUE Format
[WARN] ENOENT: no such file or directory, open 'Procfile'
[OKAY] package.json file found - trying 'npm start'
4:15:19 PM web.1 | > [email protected] start /Users/oliverpike/dev/heroku/ofp-react
4:15:19 PM web.1 | > react-scripts start
4:15:20 PM web.1 | Starting the development server...
4:15:29 PM web.1 | Failed to compile.
4:15:29 PM web.1 | Error in ./~/pg/lib/native/index.js
4:15:29 PM web.1 | Module not found: 'pg-native' in /Users/oliverpike/dev/heroku/ofp-react/node_modules/pg/lib/native
4:15:29 PM web.1 | @ ./~/pg/lib/native/index.js 1:13-33
4:15:29 PM web.1 | Error in ./~/pg/lib/connection-parameters.js
4:15:29 PM web.1 | Module not found: 'dns' in /Users/oliverpike/dev/heroku/ofp-react/node_modules/pg/lib
4:15:29 PM web.1 | @ ./~/pg/lib/connection-parameters.js 2:10-24