question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typescript starter fails test

See original GitHub issue

Hey!

Starting a new project with TypeScript has some issues.

  • The initial tests don’t pass. This is due to some inconsistencies with the initial generate command. It’s looking for a model.js.ejs template, but the actual template is model.ts.ejs.

  • When you build the project, the model.ts.ejs file doesnt get compiled to a js file.

How can we fix this for the JS build, as we have to reference a template file for the generate command. How do we handle the TS to JS change

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JeffBeltrancommented, Aug 1, 2019

Hello, just wanted to comment that im running into same issue but it looks almost like it’s intermittent(i swore it worked once). Still playing around with this atm but following the guide i get the same error but only when i TS starter.

1reaction
cogoocommented, Mar 23, 2019

Looked into this, unfortunately the TS compiler doesn’t accept “custom” extensions, in this case ‘.ejs’. An alternative could be in the npm build script, we copy the template folder into the output directory

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm run test Error #137 - microsoft/TypeScript-React-Starter
Failed at the my-app@0.1.0 test script 'react-scripts-ts test --env=jsdom'. npm ERR! Make sure you have the latest version of node.js and npm ...
Read more >
TDD with Typescript and Jest: Starter Project - Level Up Coding
If you run npm run test it will throw an error because the project does not include any test case. Now, we will...
Read more >
typescript-starter - GitHub Pages
As you develop, you can add tests for new functionality – which will initially fail – before developing the new functionality. Each time...
Read more >
TypeScript compilation failure and Karma test execution?
the usual way I know is that all the workflow (ie compilation and tests) need to pass to start the watch mode. Then...
Read more >
express-typescript-starter-semantic-release-test - npm
Start using express-typescript-starter-semantic-release-test in your project ... Deployment can fail for various reasons, if you get stuck with a page that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found