publitas / react-svg-icons

33 stars 11 forks source link

TypeError: Path must be a string. #7

Closed ixley closed 8 years ago

ixley commented 8 years ago

I'm getting an error that seems like it might be related to the asset path.

TypeError: Path must be a string. Received undefined while parsing file: [app]/node_modules/react-svg-icons/index.js

I have the asset path defined in package.json like this:

    "react-svg-icons": {
      "version": "^0.2.0",
      "assetPath": "img/global/svg-icons"
    },

(I've also tried variations on that path with no luck)

and everything else defined in a component file as specified by the README.

Have you encountered this or have an idea what might be the problem?

This is with React v0.14.8, node v6.1.0, and npm 3.8.6.

felixhageloh commented 8 years ago

is it possible that you added the path to the "dependencies" (or "devDependencies") section of your package.json? If so, you need to add a top level entry for "react-svn-icons" and configure the path there!

ixley commented 8 years ago

@felixhageloh That is absolutely what I did. This is all new enough to me that it's the only thing in the extremely straightforward documentation that tripped me up. Thank you for the speedy reply and for helping a noob out. I'm excited to have found this package!

felixhageloh commented 8 years ago

glad I could help out :)