-
"Error: ENOENT: no such file or directory, open '/home/pedro/Projects/sonicjs/server/themes/front-end/undefined/css/template.css'" Apparently the environment variables aren't set and there is no mention of setting them in the root's readme.md file or in your documentation (https://sonicjs.com/docs#prerequisites). I'll probably get it figured out before you answer this, but it'd be nice for the next guy if you could document the actual steps to get the app running, because ...
Is clearly not enough. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
I am following your recommendation here: https://sonicjs.com/docs#local-setup that says, "If this is your first time working with SonicJs, it is highly recommended that you use the out of the box file-based database." And I am also seeing that that recommendation is in direct opposition to the instructions in the readme.md file at the repo root... "Pre-requisites Setup Steps It seems that there are some huge gaps in your documentation. Maybe you are just expecting people to already know a bunch of stuff that you know?? |
Beta Was this translation helpful? Give feedback.
-
Ok. I found the code that copies the .env-default file to .env which "fixes" the original undefined theme error by setting the theme to "bootstrap". This is also where the MONGODB_URL comes from, but I am not using mongodb or wanting to use mongodb. I liked the idea that "it is highly recommended that you use the out of the box file-based database." Now I am trying to figure out how to switch to a file-based back-end for my testing and setup locally. This is important because I am also wanting to deploy it with a MySQL backend |
Beta Was this translation helpful? Give feedback.
-
Ok. I found the install scripts in server/install/ and edited package.json to enable the npm-setup.js script...
Then ran 'npm run setup' in order to initialize my mongo settings. Now I can run the app. Now I need to figure out how to switch from Mongo to a flat-file. Not to be surly or anything, but I really wish this was in the documentation! |
Beta Was this translation helpful? Give feedback.
-
Hi, sorry for all the issues that you have experienced. The website docs are out of date. Please refer to the readme for the time being until I have time to update the site. The app now uses mongo db only as a back end |
Beta Was this translation helpful? Give feedback.
-
Good news! SonicJs now uses TypeORM for it's data access layer. As a result, a flat file implementation is now possible. The default database is SQLite, which is a simple file based database. This should make it much easier to get SonicJs up and running locally without having to deal with a database. |
Beta Was this translation helpful? Give feedback.
Hi, sorry for all the issues that you have experienced. The website docs are out of date. Please refer to the readme for the time being until I have time to update the site. The app now uses mongo db only as a back end