【发布时间】:2017-03-14 01:47:06
【问题描述】:
我正在尝试将 postgres 附加组件合并到也使用 react 的 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'
9:21:18 PM web.1 | > test-app@0.1.0 start /Users/oliverpike/dev/heroku/ofp-react
9:21:18 PM web.1 | > react-scripts start
9:21:19 PM web.1 | Starting the development server...
9:21:25 PM web.1 | Failed to compile.
9:21:25 PM web.1 | Error in ./~/dns/~/native-dns/lib/server.js
9:21:25 PM web.1 | Module not found: 'dgram' in /Users/oliverpike/dev/heroku/ofp-react/node_modules/dns/node_modules/native-dns/lib
显然dgram根据这个SO线程内置到节点中: Does node.js have built-in support for UDP(datagams)?
这是 npm i dgram 的输出:
> npm i dgram
dgram@1.0.1 node_modules/dgram
【问题讨论】:
标签: node.js heroku npm npm-install heroku-postgres