ericmdantas / generator-ng-fullstack

Client, server or fullstack - it's up to you. ng-fullstack gives you the best of the latest.
MIT License
704 stars 103 forks source link

[koa + typescript] Error when compiling server code #272

Closed steadycoding closed 6 years ago

steadycoding commented 7 years ago

Steps to reproduce: Windows 10 npm 4.5.0 and node.js 7.8.0 Have installed the ngfullstack generator From cmd

  1. Create directory \dev\ngFullStack
  2. cd into directory
  3. yo ng-fullstack
  4. Options: appName, user, user@user.com, fullstack, github or bitbucket, ng2, sass, node, koa, , typescript, yes, yes, no
  5. 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

ericmdantas commented 7 years ago

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.

steadycoding commented 7 years ago

@ericmdantas Yep. Since then I've tried all sorts of combinations. The error that I get when I run the generator with these options image 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.

then without typescript image

npm run dev gives me this image image image image 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 image Without Typescript image 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.

ericmdantas commented 7 years ago

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 :smile:

ericmdantas commented 6 years ago

Might be tackled in #289