bafolts / tplant

Typescript to plantuml
https://segmentationfaults.com/tplant/default.html
GNU General Public License v3.0
267 stars 34 forks source link

Error with version 2.1.5 #33

Closed Kasea closed 5 years ago

Kasea commented 5 years ago

The recent commit 2 days ago (as of this writing) cb68f529491dabda19fe9e2ff3284ad80e8b2b30 has a bug which leads to the following error upon trying to use tplant anything.

internal/modules/cjs/loader.js:605
    throw err;
    ^

Error: Cannot find module './components/Class'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:659:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\tplant\dist\convertToPlant.js:11:15)
    at Module._compile (internal/modules/cjs/loader.js:723:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)

Installing version 2.1.4 fixes the issue.

OS: Windows 10 64-bit Version: 1803. Build: 17134.81 NPM: 6.4.1 Node: 11.4.0

bafolts commented 5 years ago

There was a fairly large re-factor that went out in 2.1.5 that introduced a lot of classes instead of the single scripts which existed previously.

How do you run tplant? The following worked for me.

node dist/index.js --input sample/Classes/Greeter.ts 
@startuml
class Greeter {
    +greeting: string
    +prefix: string
    +greet(prefix?: string): string
    +greet(): string
}
@enduml

We need to add bundling with webpack or some other tool and setup a better method of distribution.

marcosvrs commented 5 years ago

Looks like something went wrong in Travis CI. @bafolts can you take a look if the key configured in Travis is still valid? I'll manually publish the version 2.1.6.

marcosvrs commented 5 years ago

I found the problem, fixed it and publish the version 2.1.8. @Kaseaa The error should be gone now. @bafolts please take a look in the Travis configuration. It's failing to deploy.

marcosvrs commented 5 years ago

BTW, thanks for reporting the problem @Kaseaa

Kasea commented 5 years ago

No problem, glad to see swift response.