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 · 3 comments
Open

no config files #1

cojovi opened this issue Nov 5, 2023 · 3 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.

> 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
Copy link
Collaborator

treoden commented Dec 12, 2023

Hi @thanhtantran ,

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

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

3 participants