react-toolbox / react-toolbox-themr

A tool to statically extract and generate custom themes for React Toolbox
MIT License
240 stars 24 forks source link

Error: Path must be a string #42

Open fadehelix opened 7 years ago

fadehelix commented 7 years ago

react-toolbox-themr is an awesome lib, but if I try to add configuration to my package.json I get following error:

path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:1211:7)
    at processComponent (/home/adas/Dev/__trash__/reactive-list/node_modules/react-toolbox-themr/bin/builder.js:46:30)
    at /home/adas/Dev/__trash__/reactive-list/node_modules/ramda/src/internal/_createPartialApplicator.js:8:17
    at /home/adas/Dev/__trash__/reactive-list/node_modules/ramda/src/internal/_arity.js:5:45
    at _map (/home/adas/Dev/__trash__/reactive-list/node_modules/ramda/src/internal/_map.js:6:19)
    at map (/home/adas/Dev/__trash__/reactive-list/node_modules/ramda/src/map.js:57:14)
    at /home/adas/Dev/__trash__/reactive-list/node_modules/ramda/src/internal/_dispatchable.js:39:15
    at /home/adas/Dev/__trash__/reactive-list/node_modules/ramda/src/internal/_curry2.js:20:46
    at f1 (/home/adas/Dev/__trash__/reactive-list/node_modules/ramda/src/internal/_curry1.js:17:17)

This is my package.json:

{
  "name": "reactive-list",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^15.5.4",
    "react-dom": "^15.5.4",
    "react-toolbox": "^2.0.0-beta.8"
  },
  "devDependencies": {
    "react-scripts": "0.9.5",
    "react-toolbox-themr": "^1.0.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "toolbox": "react-toolbox-themr"
  },
  "reactToolbox": {
    "include": [
      "LIST",
      "LIST_ITEM"
    ],
    "customProperties": {
      "animation-duration": "0.3s",
      "color-accent": "var(--palette-pink-a200)",
      "color-accent-dark": "var(--palette-pink-700)",
      "color-primary-contrast": "var(--color-dark-contrast)",
      "color-accent-contrast": "var(--color-dark-contrast)"
    },
    "output": "assets/react-toolbox"
  }
}
manidlou commented 7 years ago

Encountered with the same issue :worried:

justinware commented 7 years ago

+1. I am getting the same issue now. I had this working last week (custom config) and was working fine, though with a recent packages update (via npm-check-updates) it is now broken. Tried various combinations of config inside package.json, in the root and in a config folder and all yielding this error. After some googling though, it seems it is happening in other modules also, and hence is likely some down-stream module / dep. Any thoughts on this @javivelasco ??

n8sty commented 6 years ago

Same thing happening for me