storybook-eol / react-cdk

under development - React Component Development Kit with Storybook
MIT License
576 stars 43 forks source link

Advice for using this as relatively linked, unpublished packages #18

Closed zeroasterisk closed 7 years ago

zeroasterisk commented 8 years ago

In my case, I've got the following directory structure:

  - myproject
    - webapp (meteor project)
    - npms
      - myuielement (created with react-cdk)

and the webapp/package.json is linking in the dependancies as follows:

    "myuielement": "../npms/myuielement",

This is working great... when running meteor locally.

But when I try to run meteor build it dies and gives me an error like the following:

$ meteor build /tmp/myproject-build

Unable to resolve some modules:

  "dist/index.js" in /Users/alan/Code/myproject/webapp/node_modules/myuielement/package.json (web.browser)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save dist

I know it has to do with main: dist/index.js in package.json --- I experimented with removing the dist to no avail (didn't expect it to help, but I tried)

Do you have any recommendations for me? These packages are no use to anyone else, it seems silly to publish them. But I love the isolation of this pattern and would prefer to keep it if I can...

Ideas?

kevinSuttle commented 8 years ago

Would npm link help? https://60devs.com/simple-way-to-manage-local-node-module-using-npm-link.html

zeroasterisk commented 8 years ago

^ @kevinSuttle yup - that's what I've been doing, once I finally figured it out. great article btw, thanks!

usulpro commented 7 years ago

@kevinSuttle Thank you for your help! 🎇 I hope we can close it now!