Closed NobleUplift closed 5 years ago
I upgraded to Node v10.15.3 and now it's a similar issue.
$ node node_modules/sequelize-auto-ts/lib/cli.ts ...
node_modules/sequelize-auto-ts/lib/cli.ts:4
import generator = require("./sequelize-auto-ts");
^^^^^^^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
*.ts
are TypeScript files which need to be run through the TypeScript compiler. The generated *.js
files are included alongside and can be run directly in Node. This is a very old project that was written for Node 0.12. I haven't tried running it with a recent version of Node or Sequelize.
I noticed the readme does incorrectly say to run the .ts
file directly. I updated the readme.
Thank you! Yeah, I noticed that I was trying to run a TypeScript file through Node on Friday, but then realized I would have to try transpiling it if I have to run the *.ts file and then I just gave up.
I got tired of not being able to get typehints for my 125 table definitions and passing all my Sequelize objects in as any. Figured I would give this project a shot. It would be a considerable rewrite in my own project so it probably saves me time not trying to get it to work.
Is this related to sequelize-auto, or was it completely written from scratch?
Just wondering what version of Node you use since I'm getting this:
I'm running Node v8.1.4 and NPM v5.0.3.