我正在尝试将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发布于 2017-03-14 01:47:06
显然,您试图在客户端应用程序中使用Sequelize和pg Node模块,但这些模块只是在Node环境中运行,不应该在客户端应用程序中使用。
https://stackoverflow.com/questions/41530233
复制相似问题