- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将项目部署到heroku。项目可以在本地运行,已成功构建:
Ties-MBP:devconnector chengtie$ git push heroku master
Enumerating objects: 12, done.
Counting objects: 100% (12/12), done.
Delta compression using up to 8 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 708 bytes | 708.00 KiB/s, done.
Total 7 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 12.x...
remote: Downloading and installing node 12.14.1...
remote: Using default npm version: 6.13.4
remote:
remote: -----> Restoring cache
remote: - node_modules
remote:
remote: -----> Installing dependencies
remote: Installing node modules (package.json + package-lock)
remote: audited 526 packages in 2.51s
remote:
remote: 4 packages are looking for funding
remote: run `npm fund` for details
remote:
remote: found 0 vulnerabilities
remote:
remote:
remote: -----> Build
remote: Running heroku-postbuild
remote:
remote: > devconnector@1.0.0 heroku-postbuild /tmp/build_2d10cdda70895c0ca15ac9e91acad1a9
remote: > NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
remote:
remote:
remote: > core-js@2.6.11 postinstall /tmp/build_2d10cdda70895c0ca15ac9e91acad1a9/client/node_modules/babel-runtime/node_modules/core-js
remote: > node -e "try{require('./postinstall')}catch(e){}"
remote:
remote:
remote: > core-js@3.6.4 postinstall /tmp/build_2d10cdda70895c0ca15ac9e91acad1a9/client/node_modules/core-js
remote: > node -e "try{require('./postinstall')}catch(e){}"
remote:
remote:
remote: > core-js-pure@3.6.4 postinstall /tmp/build_2d10cdda70895c0ca15ac9e91acad1a9/client/node_modules/core-js-pure
remote: > node -e "try{require('./postinstall')}catch(e){}"
remote:
remote: added 1672 packages from 796 contributors and audited 906305 packages in 41.702s
remote:
remote: 33 packages are looking for funding
remote: run `npm fund` for details
remote:
remote: found 0 vulnerabilities
remote:
remote:
remote: > client@0.1.0 build /tmp/build_2d10cdda70895c0ca15ac9e91acad1a9/client
remote: > react-scripts build
remote:
remote: Creating an optimized production build...
remote: Compiled with warnings.
remote:
remote: ./src/components/profile/ProfileGithub.js
remote: Line 10:6: React Hook useEffect has a missing dependency: 'username'. Either include it or remove the dependency array react-hooks/exhaustive-deps
remote:
remote: ./src/components/post/Post.js
remote: Line 14:6: React Hook useEffect has a missing dependency: 'match.params.id'. Either include it or remove the dependency array react-hooks/exhaustive-deps
remote:
remote: ./src/actions/post.js
remote: Line 158:11: 'res' is assigned a value but never used no-unused-vars
remote:
remote: ./src/components/profiles/ProfileItem.js
remote: Line 1:17: 'Fragment' is defined but never used no-unused-vars
remote: Line 1:27: 'useEffect' is defined but never used no-unused-vars
remote: Line 4:10: 'connect' is defined but never used no-unused-vars
remote: Line 5:8: 'Spinner' is defined but never used no-unused-vars
remote: Line 6:10: 'getProfiles' is defined but never used no-unused-vars
remote:
remote: ./src/components/profile/Profile.js
remote: Line 21:6: React Hook useEffect has a missing dependency: 'match.params.id'. Either include it or remove the dependency array react-hooks/exhaustive-deps
remote:
remote: ./src/actions/alert.js
remote: Line 4:10: 'STATES' is defined but never used no-unused-vars
remote:
remote: ./src/store.js
remote: Line 5:8: 'App' is defined but never used no-unused-vars
remote:
remote: ./src/components/profile-forms/EditProfile.js
remote: Line 71:6: React Hook useEffect has missing dependencies: 'profile.bio', 'profile.company', 'profile.githubusername', 'profile.location', 'profile.skills', 'profile.social', 'profile.status', and 'profile.website'. Either include them or remove the dependency array. If 'setFormData' needs the current value of 'profile.company', you can also switch to useReducer instead of useState and read 'profile.company' in the reducer react-hooks/exhaustive-deps
remote:
remote: Search for the keywords to learn more about each warning.
remote: To ignore, add // eslint-disable-next-line to the line before.
remote:
remote: File sizes after gzip:
remote:
remote: 193.04 KB build/static/js/2.6988f640.chunk.js
remote: 18.01 KB build/static/js/main.7cad9bf2.chunk.js
remote: 1.83 KB build/static/css/main.11b62bc3.chunk.css
remote: 772 B build/static/js/runtime-main.cea588d5.js
remote:
remote: The project was built assuming it is hosted at the server root.
remote: You can control this with the homepage field in your package.json.
remote: For example, add this to build it for GitHub Pages:
remote:
remote: "homepage" : "http://myname.github.io/myapp",
remote:
remote: The build folder is ready to be deployed.
remote: You may serve it with a static server:
remote:
remote: yarn global add serve
remote: serve -s build
remote:
remote: Find out more about deployment here:
remote:
remote: bit.ly/CRA-deploy
remote:
remote:
remote: -----> Caching build
remote: - node_modules
remote:
remote: -----> Pruning devDependencies
remote: removed 125 packages and audited 309 packages in 3.58s
remote:
remote: 1 package is looking for funding
remote: run `npm fund` for details
remote:
remote: found 0 vulnerabilities
remote:
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for buildpack -> web
remote:
remote: -----> Compressing...
remote: Done: 65M
remote: -----> Launching...
remote: Released v4
remote: https://ancient-shelf-71404.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/ancient-shelf-71404.git
e0ea014..b56f9ce master -> master
但是,https://ancient-shelf-71404.herokuapp.com/ 显示错误。
这是heroku log --tail
的结果:
2020-01-29T09:50:20.000000+00:00 app[api]: Build started by user chengtie@gmail.com
2020-01-29T09:52:30.353917+00:00 app[api]: Deploy e0ea014a by user chengtie@gmail.com
2020-01-29T09:52:30.368629+00:00 app[api]: Scaled to web@1:Free by user chengtie@gmail.com
2020-01-29T09:52:30.353917+00:00 app[api]: Release v3 created by user chengtie@gmail.com
2020-01-29T09:52:32.000000+00:00 app[api]: Build succeeded
2020-01-29T09:52:39.870533+00:00 heroku[web.1]: Starting process with command `npm start`
2020-01-29T09:52:42.529914+00:00 app[web.1]:
2020-01-29T09:52:42.529947+00:00 app[web.1]: > devconnector@1.0.0 start /app
2020-01-29T09:52:42.529949+00:00 app[web.1]: > node server
2020-01-29T09:52:42.529951+00:00 app[web.1]:
2020-01-29T09:52:43.030242+00:00 app[web.1]: the options [userFindAndModify] is not supported
2020-01-29T09:52:43.135493+00:00 app[web.1]: express-validator: requires to express-validator/check are deprecated.You should just use require("express-validator") instead.
2020-01-29T09:52:43.304468+00:00 app[web.1]: Server started on port 24212
2020-01-29T09:52:43.339505+00:00 app[web.1]: (node:23) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2020-01-29T09:52:43.736912+00:00 heroku[web.1]: State changed from starting to up
2020-01-29T09:52:44.728064+00:00 app[web.1]: failed to connect to server [cluster0-shard-00-01-jnhgq.azure.mongodb.net:27017] on first connect [MongoNetworkError: connection 4 to cluster0-shard-00-01-jnhgq.azure.mongodb.net:27017 closed
2020-01-29T09:52:44.728074+00:00 app[web.1]: at TLSSocket.<anonymous> (/app/node_modules/mongodb/lib/core/connection/connection.js:372:9)
2020-01-29T09:52:44.728077+00:00 app[web.1]: at Object.onceWrapper (events.js:313:26)
2020-01-29T09:52:44.728079+00:00 app[web.1]: at TLSSocket.emit (events.js:223:5)
2020-01-29T09:52:44.728081+00:00 app[web.1]: at net.js:664:12
2020-01-29T09:52:44.728083+00:00 app[web.1]: at TCP.done (_tls_wrap.js:481:7) {
2020-01-29T09:52:44.728085+00:00 app[web.1]: name: 'MongoNetworkError',
2020-01-29T09:52:44.728087+00:00 app[web.1]: [Symbol(mongoErrorContextSymbol)]: {}
2020-01-29T09:52:44.728089+00:00 app[web.1]: }]
2020-01-29T09:52:44.745668+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-01-29T09:52:44.746170+00:00 app[web.1]: npm ERR! errno 1
2020-01-29T09:52:44.748403+00:00 app[web.1]: npm ERR! devconnector@1.0.0 start: `node server`
2020-01-29T09:52:44.748626+00:00 app[web.1]: npm ERR! Exit status 1
2020-01-29T09:52:44.748985+00:00 app[web.1]: npm ERR!
2020-01-29T09:52:44.749178+00:00 app[web.1]: npm ERR! Failed at the devconnector@1.0.0 start script.
2020-01-29T09:52:44.749370+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-01-29T09:52:44.763478+00:00 app[web.1]:
2020-01-29T09:52:44.763782+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-01-29T09:52:44.763957+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-01-29T09_52_44_751Z-debug.log
2020-01-29T09:52:44.900668+00:00 heroku[web.1]: State changed from up to crashed
2020-01-29T09:52:44.904360+00:00 heroku[web.1]: State changed from crashed to starting
2020-01-29T09:52:44.883640+00:00 heroku[web.1]: Process exited with status 1
2020-01-29T09:52:55.677596+00:00 heroku[web.1]: Starting process with command `npm start`
2020-01-29T09:52:58.421225+00:00 app[web.1]:
2020-01-29T09:52:58.421243+00:00 app[web.1]: > devconnector@1.0.0 start /app
2020-01-29T09:52:58.421244+00:00 app[web.1]: > node server
2020-01-29T09:52:58.421246+00:00 app[web.1]:
2020-01-29T09:52:59.055220+00:00 app[web.1]: the options [userFindAndModify] is not supported
2020-01-29T09:52:59.216486+00:00 app[web.1]: express-validator: requires to express-validator/check are deprecated.You should just use require("express-validator") instead.
2020-01-29T09:52:59.465530+00:00 app[web.1]: Server started on port 49717
2020-01-29T09:52:59.501991+00:00 app[web.1]: (node:23) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2020-01-29T09:53:00.046649+00:00 heroku[web.1]: State changed from starting to up
2020-01-29T09:53:00.938222+00:00 app[web.1]: failed to connect to server [cluster0-shard-00-01-jnhgq.azure.mongodb.net:27017] on first connect [MongoNetworkError: connection 5 to cluster0-shard-00-01-jnhgq.azure.mongodb.net:27017 closed
2020-01-29T09:53:00.938255+00:00 app[web.1]: at TLSSocket.<anonymous> (/app/node_modules/mongodb/lib/core/connection/connection.js:372:9)
2020-01-29T09:53:00.938259+00:00 app[web.1]: at Object.onceWrapper (events.js:313:26)
2020-01-29T09:53:00.938261+00:00 app[web.1]: at TLSSocket.emit (events.js:223:5)
2020-01-29T09:53:00.938263+00:00 app[web.1]: at net.js:664:12
2020-01-29T09:53:00.938266+00:00 app[web.1]: at TCP.done (_tls_wrap.js:481:7) {
2020-01-29T09:53:00.938268+00:00 app[web.1]: name: 'MongoNetworkError',
2020-01-29T09:53:00.938270+00:00 app[web.1]: [Symbol(mongoErrorContextSymbol)]: {}
2020-01-29T09:53:00.938273+00:00 app[web.1]: }]
2020-01-29T09:53:00.954724+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-01-29T09:53:00.955173+00:00 app[web.1]: npm ERR! errno 1
2020-01-29T09:53:00.956874+00:00 app[web.1]: npm ERR! devconnector@1.0.0 start: `node server`
2020-01-29T09:53:00.957133+00:00 app[web.1]: npm ERR! Exit status 1
2020-01-29T09:53:00.957403+00:00 app[web.1]: npm ERR!
2020-01-29T09:53:00.957668+00:00 app[web.1]: npm ERR! Failed at the devconnector@1.0.0 start script.
2020-01-29T09:53:00.957894+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-01-29T09:53:00.967799+00:00 app[web.1]:
2020-01-29T09:53:00.968049+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-01-29T09:53:00.968243+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-01-29T09_53_00_959Z-debug.log
2020-01-29T09:53:01.058482+00:00 heroku[web.1]: State changed from up to crashed
2020-01-29T09:53:01.041360+00:00 heroku[web.1]: Process exited with status 1
2020-01-29T09:53:01.411353+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ancient-shelf-71404.herokuapp.com request_id=cda60434-e53d-4f35-a3c7-778f7a9481a3 fwd="176.144.215.193" dyno= connect= service= status=503 bytes= protocol=https
2020-01-29T09:53:02.219416+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ancient-shelf-71404.herokuapp.com request_id=098c8b5f-7c75-4330-b5b3-4b4295598787 fwd="176.144.215.193" dyno= connect= service= status=503 bytes= protocol=https
2020-01-29T09:53:46.942378+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/%20deployed%20to%20Heroku" host=ancient-shelf-71404.herokuapp.com request_id=4ec43208-89e8-4db5-8391-33b99a490866 fwd="176.144.215.193" dyno= connect= service= status=503 bytes= protocol=https
2020-01-29T09:53:47.393982+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ancient-shelf-71404.herokuapp.com request_id=4653c947-764c-47ea-9653-5ae5b8813a29 fwd="176.144.215.193" dyno= connect= service= status=503 bytes= protocol=https
2020-01-29T09:55:50.234324+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ancient-shelf-71404.herokuapp.com request_id=c58225cf-585c-4290-906f-54820900eee4 fwd="176.144.215.193" dyno= connect= service= status=503 bytes= protocol=https
2020-01-29T09:55:50.686349+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ancient-shelf-71404.herokuapp.com request_id=a1fce16b-9952-4489-8a79-72b5a1855d7a fwd="176.144.215.193" dyno= connect= service= status=503 bytes= protocol=https
2020-01-29T09:58:24.907640+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ancient-shelf-71404.herokuapp.com request_id=0d0ca80c-ea3a-4c8d-b930-8ea7f69fa64b fwd="176.144.215.193" dyno= connect= service= status=503 bytes= protocol=https
2020-01-29T09:58:25.349389+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ancient-shelf-71404.herokuapp.com request_id=aad9749e-a961-4a49-a4f7-3aff58aada4a fwd="176.144.215.193" dyno= connect= service= status=503 bytes= protocol=https
2020-01-29T09:58:54.771239+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ancient-shelf-71404.herokuapp.com request_id=4302a52d-553a-4be5-ac4d-b2acb61cce93 fwd="176.144.215.193" dyno= connect= service= status=503 bytes= protocol=https
2020-01-29T09:58:55.211610+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ancient-shelf-71404.herokuapp.com request_id=eb5f47a0-0b37-44f1-93cc-4b3b630ecc07 fwd="176.144.215.193" dyno= connect= service= status=503 bytes= protocol=https
我使用 MongoDB Atlas。这是生产.json
:
{
"mongoURI": "mongodb+srv://cheng123:...@cluster0-jnhgq.azure.mongodb.net/test?retryWrites=true&w=majority",
"jwtSecret": "mysecrettoken",
"githubClientId": ...,
"githubSecret": ...
}
有人知道这是怎么回事吗?
最佳答案
听起来您被防火墙阻止了。
MongoDb Atlas 建议将 IP 白名单作为其安全功能之一 - 您可以在门户的集群安全设置下查看是否已设置此功能。如果已设置(并且不使用 0.0.0.0 通配符),那么您需要将服务器 IP 范围添加到白名单中。请参阅https://docs.atlas.mongodb.com/security-whitelist/
*Disclaimer - I dont work with Heroku, so I'm not sure whether you need to open the 27017 port for your application as well. This article may be useful if your Heroku instance has dynamic IPs - https://www.mongodb.com/blog/post/integrating-mongodb-atlas-with-heroku-private-spaces
关于node.js - 由于 MongoDB,Heroku 中的应用程序错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59964685/
我想做的是让 JTextPane 在 JPanel 中占用尽可能多的空间。对于我使用的 UpdateInfoPanel: public class UpdateInfoPanel extends JP
我在 JPanel 中有一个 JTextArea,我想将其与 JScrollPane 一起使用。我正在使用 GridBagLayout。当我运行它时,框架似乎为 JScrollPane 腾出了空间,但
我想在 xcode 中实现以下功能。 我有一个 View Controller 。在这个 UIViewController 中,我有一个 UITabBar。它们下面是一个 UIView。将 UITab
有谁知道Firebird 2.5有没有类似于SQL中“STUFF”函数的功能? 我有一个包含父用户记录的表,另一个表包含与父相关的子用户记录。我希望能够提取用户拥有的“ROLES”的逗号分隔字符串,而
我想使用 JSON 作为 mirth channel 的输入和输出,例如详细信息保存在数据库中或创建 HL7 消息。 简而言之,输入为 JSON 解析它并输出为任何格式。 最佳答案 var objec
通常我会使用 R 并执行 merge.by,但这个文件似乎太大了,部门中的任何一台计算机都无法处理它! (任何从事遗传学工作的人的附加信息)本质上,插补似乎删除了 snp ID 的 rs 数字,我只剩
我有一个以前可能被问过的问题,但我很难找到正确的描述。我希望有人能帮助我。 在下面的代码中,我设置了varprice,我想添加javascript变量accu_id以通过rails在我的数据库中查找记
我有一个简单的 SVG 文件,在 Firefox 中可以正常查看 - 它的一些包装文本使用 foreignObject 包含一些 HTML - 文本包装在 div 中:
所以我正在为学校编写一个 Ruby 程序,如果某个值是 1 或 3,则将 bool 值更改为 true,如果是 0 或 2,则更改为 false。由于我有 Java 背景,所以我认为这段代码应该有效:
我做了什么: 我在这些账户之间创建了 VPC 对等连接 互联网网关也连接到每个 VPC 还配置了路由表(以允许来自双方的流量) 情况1: 当这两个 VPC 在同一个账户中时,我成功测试了从另一个 La
我有一个名为 contacts 的表: user_id contact_id 10294 10295 10294 10293 10293 10294 102
我正在使用 Magento 中的新模板。为避免重复代码,我想为每个产品预览使用相同的子模板。 特别是我做了这样一个展示: $products = Mage::getModel('catalog/pro
“for”是否总是检查协议(protocol)中定义的每个函数中第一个参数的类型? 编辑(改写): 当协议(protocol)方法只有一个参数时,根据该单个参数的类型(直接或任意)找到实现。当协议(p
我想从我的 PHP 代码中调用 JavaScript 函数。我通过使用以下方法实现了这一点: echo ' drawChart($id); '; 这工作正常,但我想从我的 PHP 代码中获取数据,我使
这个问题已经有答案了: Event binding on dynamically created elements? (23 个回答) 已关闭 5 年前。 我有一个动态表单,我想在其中附加一些其他 h
我正在尝试找到一种解决方案,以在 componentDidMount 中的映射项上使用 setState。 我正在使用 GraphQL连同 Gatsby返回许多 data 项目,但要求在特定的 pat
我在 ScrollView 中有一个 View 。只要用户按住该 View ,我想每 80 毫秒调用一次方法。这是我已经实现的: final Runnable vibrate = new Runnab
我用 jni 开发了一个 android 应用程序。我在 GetStringUTFChars 的 dvmDecodeIndirectRef 中得到了一个 dvmabort。我只中止了一次。 为什么会这
当我到达我的 Activity 时,我调用 FragmentPagerAdapter 来处理我的不同选项卡。在我的一个选项卡中,我想显示一个 RecyclerView,但他从未出现过,有了断点,我看到
当我按下 Activity 中的按钮时,会弹出一个 DialogFragment。在对话框 fragment 中,有一个看起来像普通 ListView 的 RecyclerView。 我想要的行为是当
我是一名优秀的程序员,十分优秀!