better-docs icon indicating copy to clipboard operation
better-docs copied to clipboard

Cannot resolve dependency with @component

Open joshleblanc opened this issue 5 years ago • 7 comments

This is probably a windows issue. Trying to use the @component tag results in this in entry.js

      import Wrapper from '..\node_modules\better-docs\lib\react-wrapper.js';

That should be

      import Wrapper from '../node_modules/better-docs/lib/react-wrapper.js';

The imports for the components have the same problem.

joshleblanc avatar Sep 18 '19 17:09 joshleblanc

I also get a similar error. image

robokozo avatar Sep 20 '19 16:09 robokozo

I've just published 1.3.3 version - please check it out - it should fix this (unfortunately I don't have Windows to check it out)

wojtek-krysiak avatar Sep 25 '19 12:09 wojtek-krysiak

I tried it again and got a different error with the new version.

image

robokozo avatar Sep 26 '19 05:09 robokozo

I think one possible issue is this line in bundler.js

require('path').posix

robokozo avatar Sep 30 '19 19:09 robokozo

I just want to add I'm experiencing this as well on (on a mac), this is using @component in a vue/webpack project.

image image

DomenicRoti avatar Oct 17 '19 16:10 DomenicRoti

A bit of a stretch but for future guys passing through

@DomenicRoti you need to setup aliases on your .babelrc: add this package to your project babel-plugin-module-resolver

and your .babelRC should look like(ignore the react-hot-loader): Screenshot 2020-05-06 at 16 46 42

hellhoundsx avatar May 06 '20 14:05 hellhoundsx

Why was this issue closed? It's still alive and well. The aforementioned hack is not really applicable to create-react-app based projects isn't it? We don't really have access to custom webpack configurations unless we eject. Or am I missing something?

malikalimoekhamedov avatar Aug 24 '20 12:08 malikalimoekhamedov