Skip to content

Fixing chel error messages #141

Description

@taoeffect

Problem

When running grunt dev I ran into this issue:

-> % grunt dev
Running "exec:gitconfig" (exec) task

Running "checkDependencies:this" (checkDependencies) task

Running "chelDeploy" task

Running "exec:chelDevDeploy" (exec) task
>> [SBP WARN]: registering unsafe selector: 'chelonia.db/get' (remember to lock after overwriting)
>> [SBP WARN]: registering unsafe selector: 'chelonia.db/set' (remember to lock after overwriting)
>> [SBP WARN]: registering unsafe selector: 'chelonia.db/delete' (remember to lock after overwriting)
>> [SBP WARN]: registering unsafe selector: 'chelonia.db/iterKeys' (remember to lock after overwriting)
>> [SBP WARN]: registering unsafe selector: 'chelonia.db/keyCount' (remember to lock after overwriting)
>> pino-pretty transport unavailable, using basic logging Error: unable to determine transport target for "pino-pretty"
>>     at fixTarget (file:///tmp/deno-compile-chel/build/main.js:56606:17)
>>     at transport (file:///tmp/deno-compile-chel/build/main.js:56586:26)
>>     at normalizeArgs (file:///tmp/deno-compile-chel/build/main.js:56868:20)
>>     at pino2 (file:///tmp/deno-compile-chel/build/main.js:58182:32)
>>     at file:///tmp/deno-compile-chel/build/main.js:73508:42
NODE_ENV = development
>> [chel] Error:
>> Exited with code: 123.
>> Error executing child process: Error: Process exited with code 123.
Warning: Task "exec:chelDevDeploy" failed. Use --force to continue.

Aborted due to warnings.

There are several problems here that need fixing:

  1. [chel] Error: says nothing but is nevertheless logged. It's unclear why the program failed to start.
  2. There's a pino-pretty transport unavailable error

Solution

The problem turned out to be that my chel.toml was using redis and redis wasn't running. The error that should be printed should be clear, e.g.:

chel.toml is configured for redis, but no redis server found

And it should likewise work for other backends (specifying them by name).

The pino-pretty error should be fixed entirely.

Also this NODE_ENV = undefined thing probably shouldn't be logged. We should have a single message perhaps saying, "Running in development mode." and "Running in production mode." instead.

Note that it's also repeated in some instances:

NODE_ENV = development
wrote: dist/contracts/chatroom.2.8.0.manifest.json
NODE_ENV = development
wrote: dist/contracts/group.2.8.0.manifest.json
NODE_ENV = development
wrote: dist/contracts/identity.2.8.0.manifest.json

These should be removed entirely. Note that these messages might be coming from the Gruntfile.js in Group Income, not chel, and if so a separate PR should be sent to the Group Income repo to fix those there.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions