infinyon / infinyon/fluvio-demo-apps-node

Print better error when there's no Fluvio cluster

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I went to setup the server and I got this error:

```
chat-app/chat-server$ npm run start

> chat-server@1.0.0 start /Users/nick/infinyon/fluvio-demo-apps-node/chat-app/chat-server
> npx ts-node ./src/chat-server.ts

requiring platform specific module
init users ...
[Error: Fluvio socket error]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chat-server@1.0.0 start: `npx ts-node ./src/chat-server.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chat-server@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nick/.npm/_logs/2020-10-09T19_19_08_450Z-debug.log
```

The Fluvio socket error made me realize that I had uninstalled my local cluster and had not re-installed or switched to another profile with a working cluster. If it's possible, it'd be nice to print a good error message that says what to do to fix this (e.g. "Run `fluvio cluster install --local`")

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the chat-server entry point, src/chat-server.ts, and trace where the Fluvio socket error is surfaced during npm run start. Improve the message to explain that a working cluster or profile is required and include the suggested fluvio cluster install --local command; done means the missing-cluster case gives actionable guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.