"npm start" fails
samuba opened this issue · comments
Just did a fresh clone & npm install. (Windows 10, Node 6.9.2, NPM 4.5.0)
This is the npm start output:
λ npm start
> tsoa-example@0.0.1 start E:\SourceCode\tsoa-example
> npm run build && node ./dist/server.js
> tsoa-example@0.0.1 build E:\SourceCode\tsoa-example
> npm run clean && npm run lint && npm run swagger-gen && npm run routes-gen && tsc && npm run copy-swagger-ui
> tsoa-example@0.0.1 clean E:\SourceCode\tsoa-example
> rimraf dist
> tsoa-example@0.0.1 lint E:\SourceCode\tsoa-example
> tslint ./src/**/*.ts
> tsoa-example@0.0.1 swagger-gen E:\SourceCode\tsoa-example
> tsoa swagger
> tsoa-example@0.0.1 routes-gen E:\SourceCode\tsoa-example
> tsoa routes
node_modules/@types/node/index.d.ts(358,17): error TS1110: Type expected.
node_modules/@types/node/index.d.ts(1821,15): error TS1110: Type expected.
node_modules/@types/node/index.d.ts(1825,14): error TS1110: Type expected.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! tsoa-example@0.0.1 build: `npm run clean && npm run lint && npm run swagger-gen && npm run routes-gen && tsc && npm run copy-swagger-ui`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the tsoa-example@0.0.1 build script 'npm run clean && npm run lint && npm run swagger-gen && npm run routes-gen && tsc && npm run copy-swagger-ui'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tsoa-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run clean && npm run lint && npm run swagger-gen && npm run routes-gen && tsc && npm run copy-swagger-ui
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs tsoa-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls tsoa-example
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\samue_000\AppData\Roaming\npm-cache\_logs\2017-05-14T15_21_40_915Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! tsoa-example@0.0.1 start: `npm run build && node ./dist/server.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the tsoa-example@0.0.1 start script 'npm run build && node ./dist/server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tsoa-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build && node ./dist/server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs tsoa-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls tsoa-example
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\samue_000\AppData\Roaming\npm-cache\_logs\2017-05-14T15_21_40_951Z-debug.log
Hi, update your local typescript version to latest. It is 2.0.0 in package.json by default. But TS supports literal constants only since 2.1 version.
Added pull request with this change.
@AnatolyVasilev thanks for that. However; now that /dist/ is built It still fails.
`Josephs-MacBook-Pro:api joseph$ npm start
event-cms-api@0.0.1 start /Users/joseph/Dropbox/Projects/event-cms/api
npm run build && node ./dist/server.js
event-cms-api@0.0.1 build /Users/joseph/Dropbox/Projects/event-cms/api
npm run clean && npm run lint && npm run swagger-gen && npm run routes-gen && tsc && npm run copy-swagger-ui
event-cms-api@0.0.1 clean /Users/joseph/Dropbox/Projects/event-cms/api
rimraf dist
event-cms-api@0.0.1 lint /Users/joseph/Dropbox/Projects/event-cms/api
tslint ./src/**/*.ts
event-cms-api@0.0.1 swagger-gen /Users/joseph/Dropbox/Projects/event-cms/api
tsoa swagger
Generate swagger successful.
event-cms-api@0.0.1 routes-gen /Users/joseph/Dropbox/Projects/event-cms/api
tsoa routes
Generate routes successful.
node_modules/@types/express-serve-static-core/index.d.ts(242,37): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(243,39): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(244,42): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(255,48): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(256,50): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(257,53): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(268,50): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(269,52): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(270,55): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(282,46): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(283,48): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(284,51): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(303,45): error TS1110: Type expected.
node_modules/@types/express-serve-static-core/index.d.ts(327,15): error TS1005: ',' expected.
node_modules/@types/express-serve-static-core/index.d.ts(327,38): error TS1109: Expression expected.
node_modules/@types/express-serve-static-core/index.d.ts(327,44): error TS1005: ';' expected.
node_modules/@types/express-serve-static-core/index.d.ts(352,12): error TS1005: ',' expected.
node_modules/@types/express-serve-static-core/index.d.ts(352,21): error TS1005: ';' expected.
node_modules/@types/express-serve-static-core/index.d.ts(451,21): error TS1005: ',' expected.
node_modules/@types/express-serve-static-core/index.d.ts(451,39): error TS1109: Expression expected.
node_modules/@types/express-serve-static-core/index.d.ts(451,45): error TS1005: ';' expected.
node_modules/@types/express-serve-static-core/index.d.ts(466,1): error TS1128: Declaration or statement expected.
node_modules/@types/node/index.d.ts(365,17): error TS1110: Type expected.
node_modules/@types/node/index.d.ts(1842,15): error TS1110: Type expected.
node_modules/@types/node/index.d.ts(1846,14): error TS1110: Type expected.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! event-cms-api@0.0.1 build:npm run clean && npm run lint && npm run swagger-gen && npm run routes-gen && tsc && npm run copy-swagger-ui
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the event-cms-api@0.0.1 build 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/joseph/.npm/_logs/2017-07-12T17_01_18_412Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! event-cms-api@0.0.1 start:npm run build && node ./dist/server.js
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the event-cms-api@0.0.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:`
I had the same issue. As mentioned above, doing a yarn upgrade typescript
then yarn install
fixed it. yarn start
works correctly now.
Fixed.