upgraded to 5.3.1 but still get FetchError
See original GitHub issueHello, even if I tried to upgrade to latest 5.3.1 version, I still get the FetchError when sending log entries to Stackdriver
Environment details
- OS: Windows 10
- Node.js version: 10.16.3
- npm version: 6.9.0
@google-cloud/logging
version: 5.3.1@google-cloud/logging-winston
version: 2.0.1
package.json
{
"name": "ei.logging.gcp",
"description": "Node.js app for ei.logging.gcp",
"version": "0.1.0",
"author": "Roberto Messora <roberto.messora@jakala.com>",
"dependencies": {
"body-parser": "1.19.0",
"cors": "2.8.5",
"dotenv": "8.1.0",
"express": "4.17.1",
"kafka-node": "4.1.3",
"swaggerize-express": "4.0.5",
"swagmock": "1.0.0",
"uuid": "3.3.3",
"winston": "3.2.1",
"@google-cloud/logging": "5.3.1",
"@google-cloud/logging-winston": "2.0.1",
"@google-cloud/bigquery": "4.2.1"
},
"main": "server.js",
"devDependencies": {
"eslint": "6.4.0"
}
}
Steps to reproduce
Powershell in VS Code
- rm node_modules/
- rm package-lock.json
- npm --save install
- npm rebuild
I tried both winston logging and direct logging, but I got the same result:
(node:6028) UnhandledPromiseRejectionWarning: FetchError: request to http://169.254.169.254/computeMetadata/v1/instance failed, reason: connect ENETUNREACH 169.254.169.254:80
at ClientRequest.<anonymous> (d:\Docs\Lavoro\ValueLab\LocalSearch\RfP Data Platform\Test\NodeJs\src2\ei.logging.gcp\node_modules\node-fetch\lib\index.js:1455:11)
at ClientRequest.emit (events.js:198:13)
at Socket.socketErrorListener (_http_client.js:392:9)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:6028) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Debugger listening on ws://127.0.0.1:47129/36775233-d024-4a79-a9af-8609b5a8e477
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
2019-09-19T20:57:15.400Z [winstonConsoleLogger] info: Kafka consumer ready
2019-09-19T20:57:16.124Z [winstonConsoleLogger] info: Kafka producer ready
(node:6028) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Getting Error While creating new Angular App - Stack Overflow
first delete registry using: npm config delete registry; clear cache: npm cache clear --force; now run your command: ng new myApp.
Read more >Couldn't fetch error in Google Search Console - Rank Math
To check if an individual page/post is indexed or not, go to the post/page, and then in the Advanced tab of Rank Math...
Read more >A "failed to fetch" error occurs when apt-get update is run. How ...
Edit /etc/resolv.conf . In a Terminal window run sudo gedit /etc/resolv.conf. and add the line nameserver 8.8.8.8. and save. Then do ping www.google.com....
Read more >How to fix this error in Ubuntu 17.04 'E: Unable to fetch some ...
First you run ”sudo apt-get update”. This update all your repositories for all your apps to all the latest updates lists. Then run...
Read more >failed to fetch when doing "Processor SDK Building ... - TI E2E
I run apt-get update and get no error. Is correct? Do I need do more? Thank you very much. Thomas Tang.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
issue resolved thanks @bcoe ! removed everything and then reinstalled with npm, now works fine, both with and without Winston
@robymes awesome, let me know if you bump into any more issues in the future.