Jab
Jab3mo ago

`nuxt build` Could not resolve import "@mswjs/interceptors/ClientRequest"

I am failing on the last step using denoland/deployctl on app build, see error below
10s
Run denoland/deployctl@v1
with:
project: istsos4-admin-v1
entrypoint: server/index.ts
root: src/.output
Project: istsos4-admin-v1
Entrypoint: file:///src/server/index.ts
Uploading 4 file(s) (total 1326668 bytes)
Uploading 4 asset(s) (21.5%)
Uploading 4 asset(s) (21.5%)
Uploading 4 asset(s) (21.5%)
Uploading 4 asset(s) (21.5%)
Uploading 4 asset(s) (100.0%)
Uploading 4 asset(s) (100.0%)
Deploying... (100.0%)
Finishing deployment...
Error: The deployment failed: UNCAUGHT_EXCEPTION

TypeError: Cannot assign to read only property 'request' of object '[object Module]'
at _ClientRequestInterceptor.setup (file:///src/server/index.ts:23510:27)
at _ClientRequestInterceptor.apply (file:///src/server/index.ts:22046:10)
at BatchInterceptor.setup (file:///src/server/index.ts:21293:19)
at BatchInterceptor.apply (file:///src/server/index.ts:21195:10)
at file:///src/server/index.ts:45972:13
10s
Run denoland/deployctl@v1
with:
project: istsos4-admin-v1
entrypoint: server/index.ts
root: src/.output
Project: istsos4-admin-v1
Entrypoint: file:///src/server/index.ts
Uploading 4 file(s) (total 1326668 bytes)
Uploading 4 asset(s) (21.5%)
Uploading 4 asset(s) (21.5%)
Uploading 4 asset(s) (21.5%)
Uploading 4 asset(s) (21.5%)
Uploading 4 asset(s) (100.0%)
Uploading 4 asset(s) (100.0%)
Deploying... (100.0%)
Finishing deployment...
Error: The deployment failed: UNCAUGHT_EXCEPTION

TypeError: Cannot assign to read only property 'request' of object '[object Module]'
at _ClientRequestInterceptor.setup (file:///src/server/index.ts:23510:27)
at _ClientRequestInterceptor.apply (file:///src/server/index.ts:22046:10)
at BatchInterceptor.setup (file:///src/server/index.ts:21293:19)
at BatchInterceptor.apply (file:///src/server/index.ts:21195:10)
at file:///src/server/index.ts:45972:13
here are the application build logs as well for context of @mswjs/interceptors/ClientRequestin the title Nuxt 3.17.5 with Nitro 2.11.12 vite v6.3.5
[success] [nitro] Generated public .output/public
[info] [nitro] Building Nuxt Nitro server (preset: `deno-deploy`, compatibility date: `2025-06-05`)
[plugin node-resolve] Could not resolve import "@mswjs/interceptors/ClientRequest" in /home/runner/work/istSOS4-admin/istSOS4-admin/src/node_modules/.cache/nuxt/.nuxt/dist/server/server.mjs using exports defined in /home/runner/work/istSOS4-admin/istSOS4-admin/src/node_modules/@mswjs/interceptors/package.json.
[success] [nitro] Generated public .output/public
[info] [nitro] Building Nuxt Nitro server (preset: `deno-deploy`, compatibility date: `2025-06-05`)
[plugin node-resolve] Could not resolve import "@mswjs/interceptors/ClientRequest" in /home/runner/work/istSOS4-admin/istSOS4-admin/src/node_modules/.cache/nuxt/.nuxt/dist/server/server.mjs using exports defined in /home/runner/work/istSOS4-admin/istSOS4-admin/src/node_modules/@mswjs/interceptors/package.json.
3 Replies
Jab
JabOP3mo ago
you may publicly view the Nuxt project here
GitHub
GitHub - jph6366/istSOS4-admin: web-based administration interface ...
web-based administration interface for OSGEO's istSOS, making it easier to manage and monitor SensorThings API components - jph6366/istSOS4-admin
Jab
JabOP2mo ago
so this just resolved itself. I suppose some patch to deno deploy fixed it :hooray_deno: :deno_it_works:
Jab
JabOP2mo ago
nvm it was that I had this nuxt/prometheus installed and it confllicts with Deno's built in OTel i believe
GitHub
GitHub - artmizu/nuxt-prometheus: Prometheus metrics for NodeJS and...
Prometheus metrics for NodeJS and a set of custom metrics for Nuxt applications - artmizu/nuxt-prometheus

Did you find this page helpful?