Is anyone here familiar with ts-node, and can help me with a bit of troubleshooting?

Update - a very kind person has helped me out via email, and now the code is working, yay! The files it is producing aren't quite right, but I'll check back in with the original writer on git hub and see how I go.


Hello all!

A bit stuck here, because I'm in coding territory and that's not my natural home :)

I'm a designer/illustrator, and my client has requested some furniture from a particular catalogue for the design. The catalogue is loaded into an online 3D software called Floorplanner, which only exports .fml files. I'd like to use some of these 3d models in sketch up, but the software doesn't export it. (I have contacted the software makers who are giving me a bit of a run around).

I looked for a new option in the meantime and some clever person has written a script to convert fml files to obj files for Sketchup, but I just can't get it working.

Here is the script:

https://github.com/RobbinBaauw/FloorplannerParser

and here is a test fml file:

https://drive.google.com/file/d/1o5Xd5Tilh_Cxa0tAYdx9BFkU26n…

So, I run 'yarn', and it creates the node_modules folder.
But when I go to the next step (after creating a sources folder in root) and then run cmd in root and the next line of code: ts-node fmlparser.ts / tsc
I get all kinds of error messages:

TypeError: Cannot read property 'length' of undefined

or

TypeError: Cannot read property 'project' of undefined

I've reached out to the code writer as well, but time is of the essence and I would really like the script up and running as soon as I can.

Unfortunately, I've reached the limit of my own troubleshooting and not being a coder, don't know the forums to ask in.
Can anyone help, or direct me to where I can get some troubleshooting?

If you can…please…um, use coding for dummies language. I'm ok to follow instructions, but honestly, don't know how to code.

Thank you!

Comments

  • +1

    If you don't know how to code, your best bet is to go back to the code writer. Looks like there's an issue reading the .fml file, maybe the format, as the 'result' object is coming up as undefined. There might be a bug in the code, or the wrong file format is being used.

    • Thanks, as I mentioned, I did reach out to the code writer and am waiting on a reply. In the meantime, I'm just trying to fix it myself as well and need some help :)
      I was wondering if the fml file was the issue, so I sent a version to him, as well as uploading here - in case anyone who is a coding whiz could test it super quickly.

      • You're already doing the right think by creating that issue on the repo. And the author is replying! On a two year-since last commit project! Count yourself lucky.

        No one but the author is going to be as helpful. Sure, if they're not around, we could pitch in.

        • Thanks - not being a coder, troubleshooting is a mystery.
          I posted in the hope that someone might go "Oh, yeah - I know exactly what the problem is, takes 5 seconds to work out. You've just got some of it back to front".

          Or, they might say - "give up, that'll take 2 hours to fix."

          So, of course, I'm grateful for the help, but always looking to learn a bit more myself.

          • @Lady Grey Tea: If you are not a coder then IMHO do one of the free udemy courses on NodeJS first, then Javascript and then finally Typescript. At least on Oz bargain you can find posts on the udemy courses.

            BTW the package.json in the repo looks to be done by someone who does NOT know about NodeJS. The instructions are also wrong and do NOT follow the standard NodeJS process for use by NPN or Yarn (or opne of the other lesser known Node package managers). I would not expect anyone here to take the time to clone the repo and check it out once they look at the readme.md file or package.json.

            I suggest you reach out to any of your friends who code anything on for front end web development and ask them to help you.

  • +1

    .fml seems very appropriate for you at this stage

    • +1

      …I was waiting for that comment.

      No, it'll get solved, just hoping to get it sorted sooner rather than later.

  • This is OZ bargain, not oz programming.

    • +2

      Yep, and also Oz-traffic accident assistance, Oz-romance assistance and Oz-investment help assistance…
      It's helpful to reach out to a pool of people to see if you can find someone who can help you with the next step. Notice that I did ask if anyone could direct me to a place where I could find help, if here is not the place.

      • Almost anyone can be an armchair investor, but I think you're looking for more specialised advice here.

        The trouble you will find is that most places offering coding help are intended to help people learn to code, and not intended as places to just get free code support.

        You might need to make an offer to pay someone on airtasker or freelancer. Especially as this is your job… for which you are being paid for your skills.

  • run cmd in root and the next line of code: ts-node fmlparser.ts / tsc

    As a sanity check, are you aware the slash is not part of the command? The guide is saying you can run EITHER ts-node OR tsc.

    • Thank you, yes - I did try the either / or (and also together, as I was trying everything).
      I have the code working now, although the files it is spitting out are not correct. So, back to git hub again, but I've made definite progress :)

  • Stackoverflow is your friend.

    • Thank you, I will have a look!

  • Seems like you posted here after posting an issue on github. You are better waiting and seeing if you get help on github than here.
    Github issue:
    https://github.com/RobbinBaauw/FloorplannerParser/issues/2

    • Yes, and he has already written back - but as always, hoping to save him and me some time by continuing to work on it in the meantime. I've already had an email with some help from a very kind person who took the time to help me out with the code.

Login or Join to leave a comment