C:\Users\xxx\Desktop\ts-axios>npm install
npm WARN deprecated @types/handlebars@4.1.0: This is a stub types definition. handlebars provides its own type definitions, so you do not need this installed.
> --libraryname--@0.0.0 postinstall C:\Users\xxx\Desktop\ts-axios
> ts-node tools/init
'ts-node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! --libraryname--@0.0.0 postinstall: `ts-node tools/init`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the --libraryname--@0.0.0 postinstall 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! C:\Users\xxx\AppData\Roaming\npm-cache\_logs\2019-06-25T18_32_02_015Z-debug.log
attempt to solve it by chaninng the version of ts-node to the lastest 8.3.0, then new error appears as below
const pkg = JSON.parse(readFileSync(jsonPackage) as any)
^
SyntaxError: Unexpected token Y in JSON at position 246
at JSON.parse (<anonymous>)
at finalize (C:\Users\xxx\Desktop\ts-axios\tools\init.ts:264:20)
at setupLibrary (C:\Users\xxx\Desktop\ts-axios\tools\init.ts:183:3)
at C:\Users\xxx\Desktop\ts-axios\tools\init.ts:124:7
at C:\Users\xxx\Desktop\ts-axios\node_modules\prompt\lib\prompt.js:336:32
at C:\Users\xxx\Desktop\ts-axios\node_modules\utile\node_modules\async\lib\async.js:154:25
at assembler (C:\Users\YafeiYan\Desktop\ts-axios\node_modules\prompt\lib\prompt.js:333:9)
at C:\Users\xxx\Desktop\ts-axios\node_modules\prompt\lib\prompt.js:342:32
at C:\Users\xxx\Desktop\ts-axios\node_modules\prompt\lib\prompt.js:625:5
at Interface.onLine (C:\Users\xxx\Desktop\ts-axios\node_modules\read\lib\read.js:111:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! --libraryname--@0.0.0 postinstall: `ts-node tools/init`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the --libraryname--@0.0.0 postinstall 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! C:\Users\xxx\AppData\Roaming\npm-cache\_logs\2019-06-25T18_42_04_302Z-debug.log