Hello everyone!
I’m having the following build error when trying to deploy my website which has been deployed several times in the last months with no issues.
Failed to compile.
./__next_data_cache_handler.js:1:162
Type error: Parameter 'a' implicitly has an 'any' type.
> 1 | "use strict";var W=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var it=Object.prototype.hasOwnProperty;var st=(a,t)=>{for(var e in t)W(a,e,{get:t[e],enumerable:!0})},nt=(a,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of et(t))!it.call(a,s)&&s!==e&&W(a,s,{get:()=>t[s],enumerable:!(i=tt(t,s))||i.enumerable});return a};var rt=a=>nt(W({},"__esModule",{value:!0}),a);var k=(a,t,e)=>{if(!t.has(a))throw TypeError("Cannot "+e)};var j=(a,t,e)=>(k(a,t,"read from private field"),e?e.call(a):t.get(a)),V=(a,t,e)=>{if(t.has(a))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(a):t.set(a,e)},L=(a,t,e,i)=>(k(a,t,"write to private field"),i?i.call(a,e):t.set(a,e),e);var ft={};st(ft,{default:()=>N});module.exports=rt(ft);var v=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,B=new Set,M=typeof process=="object"&&process?process:{},J=(a,t,e,i)=>{typeof M.emitWarning=="function"?M.emitWarning(a,t,e,i):console.error(`[${e}] ${t}: ${a}`)},U=globalThis.AbortController,q=globalThis.AbortSignal;if(typeof U>"u"){q=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},U=class{constructor(){t()}signal=new q;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.abort
| ^
2 | //# sourceMappingURL=next-data-cache.js.map
3 |
ELIFECYCLE Command failed with exit code 1.
Error: Command "pnpm run build" exited with 1
The thing is I cannot replicate this behaviour in my local environment, and I’m kinda lost here. I tried to update Next.js to the latest version (just in case) but the same error happens.
It’s strange because I don’t have the productionBrowserSourceMaps: true
flag in my next.config.js
but still is building some source maps files?
Has someone ever seen something like this?
Thanks in advance!
Cheers,
Fernando
Deployment URL or Custom Domain:
Environment (local, preview, production): production
Project Framework: Next.js
Build Settings:
Framework Preset: Next.js
Node/Runtime Version: 18.x
Package Manager: pnpm
Relevant Packages: