Bogdan-Lyashenko / codecrumbs

Learn, design or document codebase by putting breadcrumbs in source code. Live updates, multi-language support and more.
https://codecrumbs.io
BSD 3-Clause "New" or "Revised" License
2.71k stars 101 forks source link

Error at path #14

Closed Motytheultimate closed 5 years ago

Motytheultimate commented 5 years ago

hi there seems to be an error in your sidebar.js and a few more. i tried it with running your project directly from your sources.

the error i get is the follwing

uncaught at reactOnSourceSet TypeError: Cannot read property 'path' of undefined On example is at the follwing

  <React.Fragment>
  <div>{file.path}</div>
  <div className={'copyIcon'}>
    <Copy copyText={file.path} />
  </div>
</React.Fragment>

in sidebar js https://github.com/Bogdan-Lyashenko/codecrumbs/blob/master/src/public/js/components/sideBar/component/SideBar.js

Bogdan-Lyashenko commented 5 years ago

Hi, can you please show how you run codedrumbs, especially -e param for entry file. I assume it can’t resolve it (and, yeah, I need to add better error handling). Thanks.

Motytheultimate commented 5 years ago

sure i have to add that i ran it using npm and i should mention its a webpack project "start:cc": "codecrumbs -e src/scripts/index.js -d src"

is my starting command

edit i also tried yarn and no luck there either

Bogdan-Lyashenko commented 5 years ago

Alright, you use windows os, right? Looks like there is an issue with paths handling. This is top prio, I will have a look ASAP. Will ping you when it’s fixed. Thanks again)

P.S. yeah.. I did all development on Mac, haven’t tested it on windows yet ;)

Motytheultimate commented 5 years ago

Sure glad to find these bugs. it basically Looks like a very promising project so I'm Glad to help :)

Bogdan-Lyashenko commented 5 years ago

@Motytheultimate I fixed all (I hope 😸) bugs related to windows specifics, try version "1.0.22" (make sure to clear cache). Let me know if you still have issues. Thanks again, this was a really important issue to get aware of before 'going live". 👍

Motytheultimate commented 5 years ago

:) i'll try it later today

Motytheultimate commented 5 years ago

Looks like the path issue is fixed.

but now it throws an error at the dependecies option:

uncaught at reactByUpdatingFoldersState TypeError: Cannot read property 'dependencies' of undefined

at utils.js and on Tree.js