I encountered a strange issue 2-3 days ago. I started receiving the following error:
2-3일 전에 이상한 문제가 발생했습니다. 다음과 같은 오류가 나타나기 시작했습니다:
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\client\node_modules\next\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-company
at E:\git\desafio-viajero-visitante\client\node_modules\next\dist\build\utils.js:1268:15
at 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.
문제가 된 경로는 21일 이상 수정되지 않았기 때문에 오류의 원인일 가능성은 낮아 보였습니다. 디버깅을 진행한 후, 경로를 삭제해 보기로 했습니다. 그러자 다른 경로들에서 오류가 발생하기 시작했고, 계속해서 경로들을 삭제했습니다. 5개의 경로를 제거한 후에는 문제가 경로 자체에 있지 않다는 의심이 들기 시작했습니다. 결국 대부분의 경로를 삭제했지만, 3개월 이상 운영 중인 경로에서도 동일한 오류가 계속 발생했습니다.
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.
구글에서 같은 오류를 겪는 사용자를 발견했는데, 심지어 Next.js 템플릿으로 새 프로젝트를 시작해도 같은 문제가 발생했습니다. 이로 인해 상황은 더욱 혼란스러워졌습니다. 이후 1-2개월 전에 운영 중이던 커밋으로 되돌렸지만 오류는 사라지지 않았습니다. 분명히 제 앱 외부의 무언가가 이 문제를 일으키고 있습니다.
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.
새 프로젝트를 만드는 것은 선택지가 아닙니다. 이 프로젝트는 6개월 이상 운영 중이며 오늘 새로운 조정을 배포해야 합니다. 모든 브랜치와 테스트에서 클린 설치를 수행했고, node_modules 를 삭제했으며, package-lock.json 도 제거했습니다.
Does anyone have any idea what might be causing this?
이 문제가 무엇 때문에 발생하는지 아시는 분 계신가요?
Here’s my package.json: 제 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",
"@radix-ui/react-tooltip": "^1.1.1",
"@react-three/fiber": "^8.15.16",
"@sentry/nextjs": "^8.17.0",
"@tanstack/react-table": "^8.16.0",
"@vercel/speed-insights": "^1.0.12",
"@wojtekmaj/react-hooks": "^1.21.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "^3.6.0",
"firebase": "^10.8.1",
"firebase-admin": "^12.0.0",
"js-cookie": "^3.0.5",
"lucide-react": "^0.378.0",
"multer": "^1.4.5-lts.1",
"next": "^14.2.3",
"next-themes": "^0.3.0",
"nodemailer": "^6.9.13",
"papaparse": "^5.4.1",
"react": "^18",
"react-audio-voice-recorder": "^2.2.0",
"react-day-picker": "^8.10.1",
"react-dom": "^18",
"react-dropzone": "^14.2.3",
"react-hook-form": "^7.51.4",
"react-pdf": "^9.1.0",
"react-player": "^2.16.0",
"react-qr-code": "^2.0.15",
"react-record-webcam": "^1.1.5",
"react-unity-webgl": "^9.5.1",
"react-webcam": "^7.2.0",
"sonner": "^1.5.0",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"three": "^0.162.0",
"uuid": "^9.0.1",
"vaul": "^0.9.1",
"zod": "^3.23.6"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"autoprefixer": "^10.0.1",
"eslint": "^8.57.0",
"eslint-config-next": "14.1.0",
"eslint-plugin-react": "^7.35.0",
"globals": "^15.9.0",
"postcss": "^8",
"tailwindcss": "^3.3.0"
}
}
Any insights would be greatly appreciated.
어떤 조언이라도 매우 감사하겠습니다.