-
-
Notifications
You must be signed in to change notification settings - Fork 759
Closed
Description
Environment
- Operating System:
Darwin - Node Version:
v22.11.0 - Nuxt Version:
3.16.2 - CLI Version:
3.24.0 - Nitro Version:
2.11.8 - Package Manager:
[email protected] - Builder:
- - User Config:
compatibilityDate,modules,devtools,imports,components,css,runtimeConfig,routeRules,app,supabase,i18n,cookieControl,$production,stripe,sitemap,pwa,router,sourcemap,sentry,build,eslint,nitro,vite - Runtime Modules:
./modules/supabase-nuxt/src/module.ts,@unlok-co/[email protected],[email protected],@nuxtjs/[email protected],@vueuse/[email protected],@nuxtjs/[email protected],@dargmuesli/[email protected],floating-vue/[email protected],@nuxt/[email protected],@vite-pwa/[email protected],@nuxt/[email protected],@sentry/nuxt/[email protected],@nuxthub/[email protected] - Build Modules:
-
Reproduction
Will try to set up a repository with a reproduction asap but wanted to already get this out here
Describe the bug
When attempting to build a Nuxt 3.16.2 project using the cloudflare-pages preset (required for Nuxt Hub deployment), the build fails during the Nitro server build step.
The specific error is:
[nitro 4:52:56 PM] ERROR Error: Could not load /my-project/node_modules/nitropack/dist/presets/_unenv/workerd/process.mjs/: ENOTDIR: not a directory, open '/my-project/node_modules/nitropack/dist/presets/_unenv/workerd/process.mjs/'
This suggests that the build process is incorrectly appending a trailing slash and trying to read the file node_modules/nitropack/dist/presets/_unenv/workerd/process.mjs as if it were a directory.
Additional context
- This error occurs specifically when using the
cloudflare-pagespreset. - We are considering a migration from Vercel to Nuxt Hub, and this error is blocking our deployment and evaluation process.
- We previously encountered an issue with
papaparsesimilar to nitrojs/nitro#3071 which was resolved by adding areplacerule to the nitro config, but thisENOTDIRerror seems unrelated. - The problematic file appears to be related to Node.js
processpolyfills for the Cloudflare Workers environment: nitrojs/nitro/.../process.mjs
Logs
[nitro 5:15:31 PM] ℹ Building Nuxt Nitro server (preset: cloudflare-pages, compatibility date: 2024-07-05)
node_modules/mime/dist/src/Mime.js (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/mime/dist/src/Mime.js (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js (16:17): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js (16:25): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/core.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/core.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/core.mjs (7:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/core.mjs (7:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/core.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/core.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/core.mjs (7:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/core.mjs (7:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/api/context.js (16:14): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/api/context.js (16:22): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/api/context.js (32:21): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/api/context.js (32:29): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/api/diag.js (16:14): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/api/diag.js (16:22): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/api/diag.js (32:21): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/api/diag.js (32:29): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js (16:14): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js (16:22): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js (32:16): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js (32:24): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/responses/ResponseStream.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/responses/ResponseStream.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/responses/ResponseStream.mjs (7:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/responses/ResponseStream.mjs (7:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js (16:14): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js (16:22): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js (32:21): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js (32:29): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js (16:14): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js (16:22): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js (32:21): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js (32:29): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs (7:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs (7:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/internal/decoders/line.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/internal/decoders/line.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/internal/decoders/line.mjs (7:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/internal/decoders/line.mjs (7:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/EventStream.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/EventStream.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/EventStream.mjs (7:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/EventStream.mjs (7:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs (7:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs (7:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/AssistantStream.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/AssistantStream.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/AssistantStream.mjs (6:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/AssistantStream.mjs (6:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs (7:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs (7:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/ChatCompletionStream.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/ChatCompletionStream.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/ChatCompletionStream.mjs (7:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/ChatCompletionStream.mjs (7:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/AbstractChatCompletionRunner.mjs (1:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/openai/lib/AbstractChatCompletionRunner.mjs (1:38): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
[nitro 5:16:21 PM] ERROR Error: Could not load /my-project/node_modules/nitropack/dist/presets/_unenv/workerd/process.mjs/: ENOTDIR: not a directory, open '/my-project/node_modules/nitropack/dist/presets/_unenv/workerd/process.mjs/'
undefined
[5:16:21 PM] ERROR Could not load /my-project/node_modules/nitropack/dist/presets/_unenv/workerd/process.mjs/: ENOTDIR: not a directory, open '/my-project/node_modules/nitropack/dist/presets/_unenv/workerd/process.mjs/'
at async open (node:internal/fs/promises:638:25)
at async readFile (node:internal/fs/promises:1238:14)
at async node_modules/rollup/dist/es/shared/node-entry.js:21005:24
at async Queue.work (node_modules/rollup/dist/es/shared/node-entry.js:22231:32)
[5:16:21 PM] ERROR Could not load /my-project/node_modules/nitropack/dist/presets/_unenv/workerd/process.mjs/: ENOTDIR: not a directory, open '/my-project/node_modules/nitropack/dist/presets/_unenv/workerd/process.mjs/'
error: script "build" exited with code 1