ProtoDigitalUK/lucid

error: An error occurred during the initialisation of the lucid server

Closed this issue · 5 comments

Hello, I've seen your configuration examples and tried to create my instance. This is shell output:

error: An error occurred during the initialisation of the lucid server

 LUCID CMS  v0.5.0-alpha.0 ready in 232 ms

┃ Lucid Admin      http://0.0.0.0:8393/admin
┃ Documentation    https://lucidcms.io/getting-started

When opening url in browser, It gives 404 not found for both / and /admin.
I don't know how to get more verbose error output. I also used NODE_ENV=development with no effect.
And I'm using plain javascript, if it matters.

node version: 20.14

Hey @mortezae

Do you mind sharing your lucid.config.js file and any collections or bricks you have created? It's possible there is a type error in them that isn't being handled. Otherwise, it's worth checking any imports in your lucid.config.js file as well and ensuring they include the .js extension at the end and that your package.json is set to type module.

Version v0.5.0-alpha.1 is also available, so it's possible this is an issue that has been fixed.

Currently there is no way to get more verbose logs, but this is something i'll look into. Lucid doesn't make use of NODE_ENV.

Last edit: Oh sorry it's my fault! I'm going to correct my sources...

No worries. I'm going to close this issue, but feel free to create another if anything else pops up.

@WillYallop Well, I asked for verbosity... And It took me hours to think of the trivial trick of simply importing lucid.config.js in the index.js. Then I could see syntax errors in plain javascript and correct.

So, it turned out that there was a letter capitalization typo in /guides/configuring-lucid/ :

lucid.config.ts:
import lucid, { LibsqlAdapter LibSQLAdapter } from "@lucidcms/core";

Thank you for pointing that out. I'll make a note to get that fixed.