c8r / kit

Tools for developing, documenting, and testing React component libraries
https://compositor.io/kit
MIT License
1.21k stars 35 forks source link

`--mode library` asking for "an appropriate loader" #196

Closed VinSpee closed 6 years ago

VinSpee commented 6 years ago

Hi again!

I'm successfully running kit in its default mode. I tried to run it in library mode:

❯ yarn kit components --mode library
yarn run v1.7.0
$ /Users/vincentspeelman/Projects/TED/kit-test/kit-kit/node_modules/.bin/kit components --mode library
 kit  @compositor/kit-cli
 kit  ⠋ starting dev server...(node:82768) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
 kit  ⠏ starting dev server...✖ 「wdm」:
ERROR in ../node_modules/@compositor/kit-cli/src/Library.js 19:6
Module parse failed: Unexpected token (19:6)
You may need an appropriate loader to handle this file type.
|
|     return (
>       <Library {...props} examples={examples} />
|     )
|   }
 @ ../node_modules/@compositor/x0/lib/entry.js 217:48-60 217:72-84
 @ multi ../node_modules/@compositor/x0/lib/entry

It looks like kit is't picking up my .babelrc (or its own?)

here's my .babelrc:

{
  "presets": [
    "env",
    "stage-0",
    "react"
  ],
  "env": {
    "production": {
      "plugins": [["emotion", { "hoist": true }]]
    },
    "development": {
      "plugins": [
        ["emotion", { "sourceMap": true, "autoLabel": true }]
      ]
    }
  }
}

am I doing something wrong?

VinSpee commented 6 years ago

my bad. I'm good at programming i promise.

philkeys commented 6 years ago

@VinSpee Hey VinSpee, I was wondering what the issue with this was?

VinSpee commented 6 years ago

@philkeys I was in the wrong folder :-)

Are you having a similar issue?

philkeys commented 6 years ago

@VinSpee Yeah I am. What folder did you need to be in when calling that?

sebastienbarre commented 6 years ago

Same problem here.

TrevorHinesley commented 5 years ago

Same here.