eugene-manuilov/typeorm-uml

Error: Unexpected token import

colleeseum opened this issue · 3 comments

With DEBUG I do not really get anything useful

serge@test-pierre:~/eve/MyProject$ typeorm-uml
  @oclif/config reading core plugin /usr/local/lib/node_modules/typeorm-uml +0ms
  @oclif/config loadJSON /usr/local/lib/node_modules/typeorm-uml/package.json +0ms
  @oclif/config loadJSON /usr/local/lib/node_modules/typeorm-uml/oclif.manifest.json +20ms
(node:28273) Error Plugin: typeorm-uml: files attribute must be specified in /usr/local/lib/node_modules/typeorm-uml/package.json
module: @oclif/config@1.15.1
plugin: typeorm-uml
root: /usr/local/lib/node_modules/typeorm-uml
See more details with DEBUG=*
Error Plugin: typeorm-uml: files attribute must be specified in /usr/local/lib/node_modules/typeorm-uml/package.json
    at Plugin.warn (/usr/local/lib/node_modules/typeorm-uml/node_modules/@oclif/config/lib/plugin.js:243:19)
    at Plugin.load (/usr/local/lib/node_modules/typeorm-uml/node_modules/@oclif/config/lib/plugin.js:100:18)
    at <anonymous>
module: @oclif/config@1.15.1
plugin: typeorm-uml
root: /usr/local/lib/node_modules/typeorm-uml
See more details with DEBUG=*
  @oclif/config loadJSON /usr/local/lib/node_modules/typeorm-uml/.oclif.manifest.json +0ms
  @oclif/config reading user plugins pjson /home/serge/.local/share/typeorm-uml/package.json +0ms
  @oclif/config loadJSON /home/serge/.local/share/typeorm-uml/package.json +1ms
  @oclif/config config done +1ms
  typeorm-uml init version: @oclif/command@1.6.1 argv: [] +0ms
Error: Unexpected token import
    at Object.error (/usr/local/lib/node_modules/typeorm-uml/node_modules/@oclif/errors/lib/index.js:22:17)
    at TypeormUmlCommand.error (/usr/local/lib/node_modules/typeorm-uml/node_modules/@oclif/command/lib/command.js:60:23)
    at TypeormUmlCommand.run (/usr/local/lib/node_modules/typeorm-uml/lib/TypeormUmlCommand.js:22:22)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Hi @scmindstep

do you use typescript or es6 imports?

I have had the same issue and ts-node ./node_modules/.bin/typeorm-uml ormconfig.json fixed the issue.

Yep, that's correct @prokopsimek. There is a section in the README that says to use ts-node with typescript entities. I think we can close this thread.