Closed mehmetnyarar closed 5 years ago
Can you please share your entire project? That'll be the only way we can get this fixed. You can share it in private.
@Timer really sorry, it's a commercial project and I can't share.
I'm wondering why "bundled successfully, waiting for typecheck results" message appears despite my efforts. Is there anything else can be done for NextJS to skip type-checking?
I'm not sure if this is a bug or not, since here @kachkaev seems to understand why it appears, but I don't.
If it's not a bug, maybe I should post this to stackoverflow?
That message is unrelated if you've modified your next.config.js
to remove ForkTsCheckerWebpackPlugin
-- Next.js isn't performing any type checking.
The message still appearing is just a side effect of you tweaking the Next.js configuration to remove a plugin it expects.
I'll close this issue since it cannot be reproduced without your project.
I'm also experiencing the slow development. when I edit a common file and refresh my site, It takes about 7~8 seconds. after some debugging, I found most time is consumed in load-components.js the two require code takes very long time (my-page.js and _app.js)
FYI, I also use packages like typescript, styled-components, react-i18next...
@landvibe you can try setting { typescript: { ingoreDevErrors: true } }
in your next.config.js
. Details are in this README section: https://github.com/zeit/next.js#typescript
@kachkaev thanks it decreases the time a little. but it still takes more than 7 seconds
I found allowJs: true
in tsconfig.json makes my project very slow.
After I set it false, It takes less than 1 second.
@landvibe but nextjs seems to re-add this property the next time you start the project...
@macrozone I think nextjs only adds it on initial start, and it does not re-add
If you delete the property Next.js will re-add it. You need to explicitly set it to false
if you don't want it set to true
.
tsconfig skipLibCheck: true
works for me.
@AliasT try this new option as well: https://nextjs.org/docs/api-reference/next.config.js/ignoring-typescript-errors
@AliasT try this new option as well: https://nextjs.org/docs/api-reference/next.config.js/ignoring-typescript-errors
I've been struggling with this issue for months, this seemed to solve my issue though. Now the compile time seems about the same as it would be with CRA.
@kachkaev
ignoreBuildErrors is amazing.... seriously, my wait time when I run next dev went down from ~30s to 10s, and tests are running in 5s instead of 40s....
that should be activated by default for test and dev.
Thanks a lot!
that should be activated by default for test and dev.
ignoreBuildErrors
is only related to production builds. Can you try using next@canary
, we recently made some improvements in running typescript checks, it's significantly faster than it was before.
Type checking is disabled in development in the latest Next.js version btw (as we tracked down some massive slowdowns in the solution used to do type checking), compilation takes the same time for typescript and javascript since that change.
next@canary
next@canary
is sooooo much faster
have to switch back to the stable version :( the canary version has problems with render
ing by testing-library/react
this.props.headManager.mountedInstances.add(this);
mountedInstances is undefined
@coolgk this should be resolved in the latest canary of Next.js v9.4.5-canary.18
Type checking is disabled in development in the latest Next.js version btw (as we tracked down some massive slowdowns in the solution used to do type checking), compilation takes the same time for typescript and javascript since that change.
Can you point out how to enable back type checking? I've tried adding back the fork-ts-checker-webpack-plugin
plugin but no dice. It's pretty misleading to say that Next.js has built-in support for TypeScript but only run typechecks on build...
I only figured it out when I saw the typescript example had a typecheck
npm command.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Bug report
Describe the bug
My problems:
Context:
Also:
What I did so far:
node-modules
intsconfig.json
fork-ts-checker-webpack-plugin
typescript: { transpileOnly: true }
BUG (if it is):
There can be many factors effecting the speed. Would you suggest anything else?
To Reproduce
I can't really suggest how to reproduce, since it's a very complex project.
Expected behavior
I'd expect a fast development speed.
Screenshots
I can provide if needed...
System information
Additional context
next.config.js:
package.json:
nodemon.json