npm run build的时候报错
Closed this issue · 1 comments
i ✓ built in 7.63s 09:33:14
√ Server built in 7646ms 09:33:14
i Initializing prerenderer nitro 09:33:14
[09:33:17] WARN "file:///C:/Users/user01/Documents/GitHub/cloudflare-ai-web/node_modules/nuxt/dist/core/runtime/nitro/cache-driver.js" is imported by "virtual:#internal/nitro/virtual/storage", but could not be resolved – treating it as an external dependency.
i Prerendering 1 routes nitro 09:33:18
├─ / (368ms) nitro 09:33:18
├─ /_payload.json (2ms) nitro 09:33:18
i Prerendered 2 routes in 4.509 seconds nitro 09:33:18
ERROR Cannot read properties of undefined (reading 'split') 09:33:18
at /C:/Users/user01/Documents/GitHub/cloudflare-ai-web/node_modules/@rollup/plugin-inject/dist/es/index.js:74:74
at Map.forEach ()
at inject (/C:/Users/user01/Documents/GitHub/cloudflare-ai-web/node_modules/@rollup/plugin-inject/dist/es/index.js:71:16)
at getRollupConfig (/C:/Users/user01/Documents/GitHub/cloudflare-ai-web/node_modules/nitropack/dist/nitro.mjs:2032:29)
at build (/C:/Users/user01/Documents/GitHub/cloudflare-ai-web/node_modules/nitropack/dist/nitro.mjs:2345:24)
at /C:/Users/user01/Documents/GitHub/cloudflare-ai-web/node_modules/nuxt/dist/index.mjs:3473:13
at async build (/C:/Users/user01/Documents/GitHub/cloudflare-ai-web/node_modules/nuxt/dist/index.mjs:5001:5)
at async Object.run (/C:/Users/user01/Documents/GitHub/cloudflare-ai-web/node_modules/nuxi/dist/chunks/build.mjs:95:5)
at async runCommand$1 (/C:/Users/user01/Documents/GitHub/cloudflare-ai-web/node_modules/nuxi/dist/shared/nuxi.9edf0930.mjs:1648:16)
at async runCommand$1 (/C:/Users/user01/Documents/GitHub/cloudflare-ai-web/node_modules/nuxi/dist/shared/nuxi.9edf0930.mjs:1639:11)
ERROR Cannot read properties of undefined (reading 'split')
解决了,原来要用pnpm run build --preset=vercel_edge命令