evershopcommerce / evetheme

A nike theme for EverShop
16 stars 9 forks source link

no config files #1

Open cojovi opened 10 months ago

cojovi commented 10 months ago

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 commented 10 months ago

Hi @cojovi ,

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

Thanks

thanhtantran commented 9 months ago

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.

> evershop@0.1.0 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 commented 9 months ago

Hi @thanhtantran ,

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