encoredev / encore

Open Source Development Platform for building robust type-safe distributed systems with declarative infrastructure
https://encore.dev
Mozilla Public License 2.0
7.56k stars 320 forks source link

encore run error #1445

Closed berbersky closed 2 weeks ago

berbersky commented 1 month ago

first run it run then this error log show up, what does [invalid path: literal cannot be empty] refers to?

PS D:\F\wamp64\www\Future\encore\backend-2608> encore run --debug
  ⠙ Building Encore application graph... 
  ⠙ Analyzing service topology... 
invalid path: literal cannot be empty

Stack backtrace:
   0: anyhow::backtrace::capture::Backtrace::capture
   1: anyhow::kind::Adhoc::new
   2: core::ops::function::FnOnce::call_once
   3: encore_tsparser::parser::parser::Parser::parse
   4: scoped_tls::ScopedKey<T>::set
   5: tsparser_encore::main
   6: std::sys_common::backtrace::__rust_begin_short_backtrace
   7: main
   8: __tmainCRTStartup
   9: mainCRTStartup
  10: <unknown>
  11: <unknown>

Stack backtrace:
   0: anyhow::backtrace::capture::Backtrace::capture
   1: anyhow::kind::Adhoc::new
   2: scoped_tls::ScopedKey<T>::set
   3: tsparser_encore::main
   4: std::sys_common::backtrace::__rust_begin_short_backtrace
   5: main
   6: __tmainCRTStartup
   7: mainCRTStartup
   8: <unknown>
   9: <unknown>
fredr commented 1 month ago

Sorry for the bad error message, we are working on getting those better.

Do you have any path that ends with /? in that case just remove the trailing slash.

If you have defined path: "/", you can change that to a catch all path: "/!rest"as a workaround

kasyap1234 commented 1 month ago

is the os windows ?

fredr commented 1 month ago

If you update to the latest version with encore version update you should get a better error message for this

fredr commented 2 weeks ago

Let us know if you are still having problems with this, I'll close the issue for now.