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

no config files #1

Open
cojovi opened this issue Nov 5, 2023 · 5 comments
Open

no config files #1

cojovi opened this issue Nov 5, 2023 · 5 comments

Comments

@cojovi
Copy link

cojovi commented Nov 5, 2023

i have built evershop in all 3 ways available; npx, npm, and docker and none of the three contain a "config/default.json" nor a config folder at all... is this something i create of my own? the install details lead me to beleive it should be already there.

any help?

@treoden
Copy link
Collaborator

treoden commented Nov 5, 2023

Hi @cojovi ,

Yes, that is something you can create by yourself, If not, EverShop will just load the default configuration

Thanks

@thanhtantran
Copy link

I have created config file, my default.json below:

{
    "shop" : {
        "currency": "VND",
        "language": "vi",
        "weightUnit": "kg"
    },
    "catalog": {
        "product": {
            "image": {
                "thumbnail": {
                    "width": 100,
                    "height": 100
                },
                "listing": {
                    "width": 300,
                    "height": 300
                },
                "single": {
                    "width": 500,
                    "height": 500
                }
            }
        },
        "showOutOfStockProduct": false
    },
    "system": {
        "theme": "eve",
    }
}

but when i run npm run build it has error

debian@debian:/www/wwwroot/evershop$ npm run build
npm WARN config init.module Use `--init-module` instead.

> [email protected] build
> evershop build


❌ Error: Cannot parse config file: '/www/wwwroot/evershop/config/default.json': SyntaxError: Unexpected token } in JSON at position 628
    at util.parseFile (/www/wwwroot/evershop/node_modules/config/lib/config.js:853:11)
    at /www/wwwroot/evershop/node_modules/config/lib/config.js:649:26
    at Array.forEach (<anonymous>)
    at util.loadFileConfigs (/www/wwwroot/evershop/node_modules/config/lib/config.js:648:16)
    at new Config (/www/wwwroot/evershop/node_modules/config/lib/config.js:113:27)
    at Object.<anonymous> (/www/wwwroot/evershop/node_modules/config/lib/config.js:1510:31)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)

@treoden
Copy link
Collaborator

treoden commented Dec 12, 2023

Hi @thanhtantran ,

You have a comma here: "theme": "eve",. You have to remove it

@Dhanasaitholeti
Copy link

Hey @treoden,

i'm trying to build a multitenant application using evershop. i have modified the tables to include necessary data by extensions.
but how can i change the default products fetching logic?

can you specify how can i do that, and also can i disable default banner in landing page?

by the way great work with evershop

@treoden
Copy link
Collaborator

treoden commented Mar 27, 2025

Hi @Dhanasaitholeti ,

can you specify how can i do that

EverShop uses GraphQL for data fetching, depends on what kind of data you need to change you can have a custom GraphQL type and resolvers to make it work. You can check more details here: https://evershop.io/docs/development/knowledge-base/graphql

and also can i disable default banner in landing page?
If I am not mistaken, it is a widget from backend (Text widget). You can disable it

Thanks

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

4 participants