I could do a massive write up on this but I just dont have time.
I am in the lucky position to have at my disposal both a powerful AI Optimised PC and an equally awesome Macbook Pro M4 Max
I wasted a whole day trying to track down an issue where YARN would not build on my PC and ended up putting an exclusion in my next.config.js file to ignore build errors. (Dangerous, but neccasary at the time as I was trying to get a feature working).
-----------------<SNIP>-----------------
/** @type {import('next').NextConfig} */
const nextConfig = {
// TEMPORARY WORKAROUND: Ignore TypeScript build errors to unblock deployment
// Remove this once Next.js type generation bug is fixed
typescript: {
ignoreBuildErrors: true,
},
-----------------<SNIP>-----------------
My issue was that the compiler was finding Type errors in the .next folder (yep thats the one used for builds), and neither I, nor Cursor, could find the source to fix it.
Well today, I got up, pulled the code down from Github onto my Mac, and ran the build. It came up with a different build error in a much more accesiable place. AND THEN....
Cursor, running on my Mac took over!! Over the next few minutes Cursor modified a dozen or so files, bumped into build errors, fixed them, recompiled and moved on. It kept up this cycle untill I had a shiny new working build. I am totally Impressed!!!!
Whats more, having tested my build for completness, I pushed the code to Github.
Then on the PC I pulled down the new code, did a clean yarn install after deleting my .next, node_modules folders, and deleting yarn.lock.
Proof of the pudding is in the eating as they say...
I fired up yarn build, and, TADA!!, it compiled flawlessly. I then ran the app, tested for completnes and its all working. I wasted a day yesterday trying to figure out this error, finaly settling on the not to great a decision of ignoring build errors (DO NOT DO THIS IT IS BAD BAD BAD!!) If you do do it make sure you document it somewhere. I keep a snag list. Lets just say snag-2.10 is now dealt with
"2.10 - Yarn build fails with errors regarding types. this is a nextjs bug and is awaiting a fix. We have put a temporary workaround in place in the next.config.js that allows the build to ignore type errors."
I have no idea WHY cursor ran so well on the Mac but it definitly did a much better job of understanding my codebase and fixing my error. Both environments on the PC and Mac are the same. running Agent and auto (for model selection)
Think I need to buy more monitor cables to get my Mac laptop on to the big displays. My Mac mini, can become the kids media PC and programming workhorse.
And heres the mega git commit
-----------------<SNIP>-----------------
fix: update API routes and components for Next.js 15 compatibility
- Update dynamic API route parameter types to use Promise-based params
- Change from context.params to await params in route handlers
- Update page components to handle params as Promise with use() hook
- Fix server components to await searchParams
- Update imports to use Request instead of NextRequest where needed
- Fix type import paths (@/lib/types instead of @/types/user)
- Add null checks for searchParams in client components
- Fix getUserById function call by removing unnecessary second parameter
- Update component interfaces to match actual data structures
- Add missing HOLDING state transitions to all asset types
- Ensure all enum values are properly handled in constants
Files modified:
- API routes: assets, locations, users with dynamic parameters
- Page components: assets/[id], users
- Components: auth, locations, users
- Constants: asset state transitions
- Types: user and asset interfaces
Resolves build errors and ensures compatibility with Next.js 15.4.1
-----------------<SNIP>-----------------