I encountered a strange issue 2-3 days ago. I started receiving the following error:
SyntaxError: Unexpected identifier '#Y'at wrapSafe (node:internal/modules/cjs/loader:1427:18)at Module._compile (node:internal/modules/cjs/loader:1449:20)at Module._extensions..js (node:internal/modules/cjs/loader:1588:10)at Module.load (node:internal/modules/cjs/loader:1282:32)at Module._load (node:internal/modules/cjs/loader:1098:12)at TracingChannel.traceSync (node:diagnostics_channel:315:14)at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)at Module.require (node:internal/modules/cjs/loader:1304:12)at mod.require (E:\git\desafio-viajero-visitante\clientode_modulesext\dist\server\require-hook.js:65:28)at require (node:internal/modules/helpers:123:16)Error: Failed to collect page data for /api/dashboard/create-companyat E:\git\desafio-viajero-visitante\clientode_modulesext\dist\build\utils.js:1268:15at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {type: 'Error'}The route in question hadn't been modified in over 21 days, so it seemed unlikely that it was the source of the error. After some debugging, I decided to delete the route and see what happened. This led to errors on other routes, so I continued deleting them. After removing 5 routes, I began to suspect that the issue wasn't with the routes themselves. I eventually deleted most of them, but the same error persisted on routes that had been in production for over 3 months.
I found some users on Google experiencing the same error, even when starting a new project from scratch with a Next.js template. This made the situation even more puzzling. I then reverted to a commit that was in production 1-2 months ago, but the error remained. Clearly, something external to my app is causing this issue.
https://stackoverflow.com/q/79175066/28265133
Creating a new project isn't an option since this one has been in production for over 6 months, and I need to deploy new adjustments today. I've performed a clean install on all branches and tests, deleted node_modules, and removed package-lock.json.
Does anyone have any idea what might be causing this?
Here's my package.json:
{ "name": "client", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@hookform/resolvers": "^3.3.4", "@nivo/bar": "^0.87.0", "@nivo/line": "^0.87.0", "@nivo/pie": "^0.87.0", "@radix-ui/react-accordion": "^1.2.0", "@radix-ui/react-alert-dialog": "^1.0.5", "@radix-ui/react-aspect-ratio": "^1.1.0", "@radix-ui/react-avatar": "^1.0.4", "@radix-ui/react-checkbox": "^1.0.4", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-radio-group": "^1.2.0", "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-separator": "^1.0.3", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-toast": "^1.1.5",Any insights would be greatly appreciated.