super slow developer environment
Unanswered
Long-legged ant posted this in #help-forum
Long-legged antOP
I created a new project and
My first development environment took 30s, and even things like favicon.ico pulls 515 modules?
npm run dev
takes >30s to compile⯠npx create-next-app@latest nextjs-blog
Need to install the following packages:
create-next-app@14.1.0
Ok to proceed? (y) y
✔ Would you like to use TypeScript? … No / Yes
✔ Would you like to use ESLint? … No / Yes
✔ Would you like to use Tailwind CSS? … No / Yes
✔ Would you like to use `src/` directory? … No / Yes
✔ Would you like to use App Router? (recommended) … No / Yes
✔ Would you like to customize the default import alias (@/*)? … No / Yes
✔ What import alias would you like configured? … @/*
Creating a new Next.js app in /Users/jawaugh/labs/scratch/fixme/nextjs-blog.
Using npm.
Initializing project with template: app-tw
Installing dependencies:
- react
- react-dom
- next
Installing devDependencies:
- typescript
- @types/node
- @types/react
- @types/react-dom
- autoprefixer
- postcss
- tailwindcss
- eslint
- eslint-config-next
added 360 packages, and audited 361 packages in 24s
128 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Initialized a git repository.
Success! Created nextjs-blog at /Users/jawaugh/labs/scratch/fixme/nextjs-blog
â¯
⯠ls
nextjs-blog
⯠cd nextjs-blog
ls
⯠ls
README.md next-env.d.ts node_modules package.json public tsconfig.json
app next.config.mjs package-lock.json postcss.config.js tailwind.config.ts
⯠npm run dev
> nextjs-blog@0.1.0 dev
> next dev
â–² Next.js 14.1.0
- Local: http://localhost:3000
✓ Ready in 6s
â—‹ Compiling / ...
✓ Compiled / in 27.9s (510 modules)
✓ Compiled in 2.6s (240 modules)
â—‹ Compiling /favicon.ico ...
✓ Compiled /favicon.ico in 4.4s (515 modules)
My first development environment took 30s, and even things like favicon.ico pulls 515 modules?
11 Replies
Long-legged antOP
✓ Ready in 6s
â—‹ Compiling / ...
✓ Compiled / in 27.9s (510 modules)
✓ Compiled in 2.6s (240 modules)
â—‹ Compiling /favicon.ico ...
✓ Compiled /favicon.ico in 4.4s (515 modules)
These lines feel terrible. Why does it take 28 seconds to open just a default simple page?
How is it possible that a favicon requires 515 modules to load?
I don't remember this being the case ~1 year ago when i first started using next - and seems to be an issue that was introduced sometime since? I'm using the standard create next app, so i feel like this is a pure bug inside of next?
Plott Hound
Did you try with turbo pack?
In your package.json try changing the dev to this
{
"scripts": {
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
}
}
{
"scripts": {
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
}
}
Long-legged antOP
yes i tried, a little better, but still very slow.
Plott Hound
Considering it’s a fresh install it’s most likely your computer speed or something else in your dev environment. I reproduced your steps and it’s compiling the pages in 0.8s on an i7 imac
Long-legged antOP
I'm on an M2 macbook air.
nothing else running.
I've got 2 other friends with M2s right now with me who see the same thing.
Are you saying you don't see "510 modules" on this?
nothing else running.
I've got 2 other friends with M2s right now with me who see the same thing.
Are you saying you don't see "510 modules" on this?
Plott Hound
i just tested a massive next project on an old 2015 mbp i5:
â–² Next.js 14.0.4
- Local: http://localhost:3000
- Environments: .env
✓ Ready in 12.8s
â—‹ Compiling / ...
✓ Compiled / in 10.3s (2611 modules)
✓ Compiled in 1265ms (1294 modules)
â—‹ Compiling /favicon.ico ...
✓ Compiled /favicon.ico in 2.3s (1345 modules)
Plott Hound
14.1.0 is definitely a bit slower for me in dev
but with turbo :
â—‹ Compiling / ...
✓ Compiled / in 20.2s (2636 modules)
but with turbo :
â—‹ Compiling / ...
✓ Compiled / in 11.1s
Long-legged antOP
yeah, this is way too slow imo - the 1000s of modules for "favicon.ico" feels like a bug
Plott Hound
It’s not 1000s of modules for a Favicon… that number is cumulative of everything so far
Long-legged antOP
how is it cumulative if it goes down? eg. in your example, it started at 2611 for
/
then later, 1345 for /favicon.ico
, so it seems like its going down and not just purely adding up