create-component-app icon indicating copy to clipboard operation
create-component-app copied to clipboard

No config file detected

Open s10wen opened this issue 6 years ago • 2 comments

Hi, great project thanks! 👍🏻

I'm having an issue with using the config file. I've created it in the project root and would like to use includeStories:

config.json

{
  "path": "./src/components",
  "includeStories": true
}

When I run create-component-app or create-component-app --config config.json I get the message:

[Info] No config file detected, using defaults.
[Info] Your component is created!

Oddly, if I break the json formatting I get an Error, so it looks to be finding it.

༼ つ ◕_◕ ༽つ⚡ create-component-app --config config.json
[Error] An error occured while parsing your config file. Using defaults...

 JSON Error in /Users/uidesign1/Documents/workspace/nbrown-ui/config.json:
Trailing comma in object at 4:1
}
^
? Do you wanna choose a template (y/N)

Any ideas please?

s10wen avatar Aug 14 '19 12:08 s10wen

Hi! I’m really sorry but I can’t see what’s going on until the end of August, because I have no computer with me in holidays. I’ll be super happy to help you when I’ll come back home!

Anyway, try to use this path ./config.json instead of config.json (just to try a different way)

I'm sorry about that. Thank you so much for your help

CVarisco avatar Aug 14 '19 16:08 CVarisco

Ah, no worries, enjoy your holidays!! 🏖 I've found a work around for now :)

Some more info that might help when you get back if it's useful:

Didn't work:

༼ つ ◕_◕ ༽つ⚡ create-component-app
[Info] No config file detected, using defaults.

Didn't work:

༼ つ ◕_◕ ༽つ⚡ create-component-app --config config.json
? Do you wanna choose a template Yes
[Info] No config file detected, using defaults.

Did work! 😍

༼ つ ◕_◕ ༽つ⚡ create-component-app --config config.json
? Do you wanna choose a template No

Config:

{
  "jsExtension": "jsx",
  "includeStories": true
}

Looks like using custom templates doesn't support config files for me, not sure if this is intended or not? I'll take a further look into creating my own custom template.

s10wen avatar Aug 15 '19 10:08 s10wen