Replies: 17 comments
-
Cannot reproduce with |
Beta Was this translation helpful? Give feedback.
-
Tried simple JS version instruction from https://nextjs.org/learn/basics/getting-started/setup Probably issue on my side, but what can I check? |
Beta Was this translation helpful? Give feedback.
-
Try running |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I am getting the same error with: I even tried downgrading to
|
Beta Was this translation helpful? Give feedback.
-
@jrop @amal Could you post your package.json, tsconfig, and next.config.js? |
Beta Was this translation helpful? Give feedback.
-
@merelinguist in some strange way it all just started to work normally as usual. Couldn't reproduce the error to prepare files for you. So for me issue is resolved magically, sorry for disturbing :) |
Beta Was this translation helpful? Give feedback.
-
package.json:
tsconfig.json:
I do not have a next.config.js in my project. To make matters more confusing, I have another computer where this project works flawlessly:
Perhaps I will try downgrading versions later on my laptop where this is not working to match the machine with known good configuration. |
Beta Was this translation helpful? Give feedback.
-
Hmmm, after downgrading all my Node/yarn/npm versions to match the following (12.6.0/1.17.0/6.14.4), my laptop will still not build the project. My PC, however, has no problem. |
Beta Was this translation helpful? Give feedback.
-
I just realized that I never mentioned that I am using Ubuntu Linux on both of my machines |
Beta Was this translation helpful? Give feedback.
-
To make matters worse, I just pulled a completely fresh checkout of my repository on my PC (where the project was working), and the freshly checked-out directory does not build. Running |
Beta Was this translation helpful? Give feedback.
-
Alright, I must have weekend brain: the error occurs on both my PC + Laptop. Sorry for the confusion. In my case, it seems to be that I am using |
Beta Was this translation helpful? Give feedback.
-
@merelinguist new info. But just start from Git Bash or Power Shell console and it works like a charm! Reinstallation of the project in the cmd console didn't change anything (I thought it could be some environment clash between cmd and git bash). Error stack trace (If it can be helpful):
|
Beta Was this translation helpful? Give feedback.
-
I can't intergrate typescript in development. I read a blog https://nextjs.org/blog/next-9. typescript is intergrated in development, but it's still not working. Really magic ✌️ my tsconfig.json |
Beta Was this translation helpful? Give feedback.
-
This is not really a solution, but if you want to start a Next.js project with TS, take a look at https://github.com/UnlyEd/next-right-now
Tip: Bookmark https://react-typescript-cheatsheet.netlify.app/docs/basic/setup which is an awesome resource for TS. |
Beta Was this translation helpful? Give feedback.
-
It is not integrated in development, I just spent a few hours on this! Here this comment could help. |
Beta Was this translation helpful? Give feedback.
-
Mine didn't work when I copied over another project until I copied over the hidden .babelrc file with the contents: { |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
Describe the bug
Current instruction for starting Next.js project with TypeScript not working.
To Reproduce
Steps to reproduce the behavior:
Also tried with:
yarn create next-app --example with-typescript with-typescript-app
Had the same type of error.
Expected behavior
The dev server started successfully, a tsconfig.json file was created for me, index page opens successfully.
System information
Beta Was this translation helpful? Give feedback.
All reactions