w3tecch / express-typescript-boilerplate

A delightful way to building a RESTful API with NodeJs & TypeScript by @w3tecch
MIT License
3.31k stars 905 forks source link

error with the last ts-node (^4.1.0) in setup #57

Closed Paul75 closed 6 years ago

Paul75 commented 6 years ago

Hello,

Have errors with the last ts-node version : "ts-node": "^4.1.0",

Not want to setup.

> express-typescript-boilerplate@3.0.0-rc.1 start /Users/far-paul/Sites/printaplus/express-typescript-boilerplate
> nps "setup.db"

nps is executing `setup.db` : nps db.migrate && nps db.seed
nps is executing `db.migrate` : nps banner.migrate && nps config && ts-node -F ./node_modules/typeorm/cli.js migrations:run
nps is executing `banner.migrate` : ts-node -F ./commands/banner.ts migrate
Error: Cannot find module '/Users/far-paul/Sites/printaplus/express-typescript-boilerplate/migrate'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Function.Module.runMain (module.js:684:10)
    at Object.<anonymous> (/Users/far-paul/Sites/printaplus/express-typescript-boilerplate/node_modules/ts-node/src/_bin.ts:177:12)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
The script called "banner.migrate" which runs "ts-node -F ./commands/banner.ts migrate" failed with exit code 1 https://github.com/kentcdodds/nps/blob/v5.7.1/other/ERRORS_AND_WARNINGS.md#failed-with-exit-code
The script called "db.migrate" which runs "nps banner.migrate && nps config && ts-node -F ./node_modules/typeorm/cli.js migrations:run" failed withexit code 1 https://github.com/kentcdodds/nps/blob/v5.7.1/other/ERRORS_AND_WARNINGS.md#failed-with-exit-code
The script called "setup.db" which runs "nps db.migrate && nps db.seed" failed with exit code 1 https://github.com/kentcdodds/nps/blob/v5.7.1/other/ERRORS_AND_WARNINGS.md#failed-with-exit-code
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! express-typescript-boilerplate@3.0.0-rc.1 start: `nps "setup.db"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the express-typescript-boilerplate@3.0.0-rc.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/far-paul/.npm/_logs/2018-02-18T09_13_27_413Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! express-typescript-boilerplate@3.0.0-rc.1 setup: `npm start setup.db`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the express-typescript-boilerplate@3.0.0-rc.1 setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/far-paul/.npm/_logs/2018-02-18T09_13_27_437Z-debug.log

Thanks

hirsch88 commented 6 years ago

Hi @Paul75 This should be fixed in the new version 3.0.0-rc.2. Cheers