Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When try to update code and save #1

Closed
AnsarAzees opened this issue Nov 15, 2021 · 2 comments
Closed

When try to update code and save #1

AnsarAzees opened this issue Nov 15, 2021 · 2 comments

Comments

@AnsarAzees
Copy link

Lucifer 1.0.3

Starting...

Server running at http://localhost:4000

GET /user
POST /user
DELETE /user
GET /user/:id
PUT /user/:id
DELETE /user/:id
GET /

[I] TIME: 2021-11-15T10:06:27.995919
[I] TIME: 2021-11-15T10:06:28.000755 PUT /user/1
[I] TIME: 2021-11-15T10:06:28.001479 Params: {id: 1}
[I] TIME: 2021-11-15T10:06:28.027676
[I] TIME: 2021-11-15T10:06:28.045874 Response: 200 {"success":true}
Reloading...

Unhandled exception:
Bad state: StreamSink is already bound to a stream
#0 _StreamSinkImpl.addStream (dart:io/io_sink.dart:148:7)
#1 _StdSink.addStream (dart:io/stdio.dart:338:55)
#2 _run (file:///Users/jaisonjoseph/.pub-cache/hosted/pub.dartlang.org/lucy-1.0.6/bin/lucy.dart:103:10)

#3 _hotrun.. (file:///Users/jaisonjoseph/.pub-cache/hosted/pub.dartlang.org/lucy-1.0.6/bin/lucy.dart:88:19)

@salkuadrat
Copy link
Owner

salkuadrat commented Nov 15, 2021

It's actually a hot reload feature to automatically reload the server after updating the code.

But it looks like the stdout (to print Lucifer logs in the terminal) didn't work properly at reload.

Can you specify the environment (OS, dart version, etc) you use?

Also, try update lucy to the new version (1.0.7) by running "pub global activate lucy" again.
I've put some delay before adding stream to stdout in lucy 1.0.7. Think it might handle the stdout reload problem.
Let me know if it works (or not)

Here's a screenshot example when it works:

@AnsarAzees
Copy link
Author

issue fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants