[koa + typescript] Error when compiling server code
steadycoding opened this issue · 4 comments
Steps to reproduce:
Windows 10
npm 4.5.0 and node.js 7.8.0
Have installed the ngfullstack generator
From cmd
- Create directory \dev\ngFullStack
- cd into directory
- yo ng-fullstack
- Options: appName, user, user@user.com, fullstack, github or bitbucket, ng2, sass, node, koa, , typescript, yes, yes, no
- npm run dev
Comments:
I have repeated these steps using C drive only and from a separate data drive with the same results.
Also fails on Next generator
Hey, @steadycoding.
If I remember correctly, typescript and koa weren't getting along very well. Can you please post the whole error message? I'm pretty sure that's the error.
@ericmdantas Yep. Since then I've tried all sorts of combinations.
The error that I get when I run the generator with these options
npm run dev error: "tsc && concurrently "nodemon ./server/index --watch server" "gulp""
npm start error: "node server/index"
gulp error: a browser tab opens with the index.html page and a todo input field, but it's not responsive even though the terminal is listening.
npm run dev gives me this
I then ran npm i -g istanbul mocha babel gulp-cli and npm install -g typescript typings and typings install
then I ran npm run dev again in both projects.
With Typescript
Without Typescript
I guess the issues are that typescript is not really working and the getting started page should move the npm run dev commands to the end after the using node/go/typescript sections.
I'm glad I came back and gave it another shot. The generator is really nice when it works. Bummed to be missing typescript.
Thanks for providing such details!
So, yeah, that's what I expected. Koa and Typescript are not working together - the other combinations are doing fine.
I'll check what's available in terms of typings for Koa and release a patch with it. If you'd like, feel free to send a PR 😄
Might be tackled in #289