with-typescript example not transpiling any ts files, giving 404
See original GitHub issueExamples bug report
Example name
with-typescript
Describe the bug
Getting 404 when I visit http://localhost:3000.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
npx create-next-app --example with-typescript with-typescript-appcd with-typescript-appnpm installnpm run devornpm run build && npm start- Visit
localhost:3000
Expected behavior
Expected to not get a 404 error.
Screenshots


System information
- OS: MacOS Mojave
- Browser: Google Chrome
- Version of Next.js: 8.1
Additional context
It seems to me like the problem is that the index.js file is not being generated. Are the .babelrc and next.config.js files missing from the with-typescript example?
next.config.js
const withTypescript = require('@zeit/next-typescript')
module.exports = withTypescript()
.babelrc
{
"presets": [
"next/babel",
"@zeit/next-typescript/babel"
]
}
When I manually add these two files (following this README: https://github.com/zeit/next-plugins/tree/master/packages/next-typescript) it works just fine:


Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
with-typescript example not transpiling any ts files, giving 404
It seems to me like the problem is that the index.js file is not being generated. Are the .babelrc and next.config.js files missing...
Read more >404 (Not Found) error using .ts files - Stack Overflow
ts file to main.js extention, there's no 404 error. Here is my systemjs.config.js file: (function (global) ...
Read more >ts-node - npm
This error is thrown by node when a module has an unrecognized file extension, or no extension at all, and is being executed...
Read more >Fight TypeScript with TypeScript - Tomasz Pluskiewicz
Here's my first test. I will place all tests in tests folder and my modules in the src folder as you can see...
Read more >JSDoc typings: all the benefits of TypeScript, with none of the ...
Can I get the buildless, no transpiling simplicity of JavaScript, along with the ability to statically type functions and classes?
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I had this issue and running
next@^8.1.1-canary.57solved the issue.Hey @jplew, I updated example so it reflects the latest canary. Thx for heads up 👍