nuxt-appwrite icon indicating copy to clipboard operation
nuxt-appwrite copied to clipboard

Appwrite v1.5's new ExecutionMethod causing build problem

Open mirsella opened this issue 1 year ago • 2 comments

Environment

Working directory: /home/mirsella/dev/inspire Nuxt project info:


  • Operating System: Linux
  • Node Version: v22.0.0
  • Nuxt Version: 3.10.3
  • CLI Version: 3.10.1
  • Nitro Version: 2.9.4
  • Package Manager: [email protected]
  • Builder: -
  • User Config: modules, app, devtools, ssr, ogImage, schemaOrg, appwrite, runtimeConfig, nitro, site
  • Runtime Modules: @nuxtjs/[email protected], [email protected], @nuxtjs/[email protected]
  • Build Modules: -

Reproduction

Use the functions.createExecution function and try to set a http method (the signature changed, it now take method?: ExecutionMethod | undefined to set the http method).

import { ExecutionMethod } from "node-appwrite"
const { functions } = useAppwrite();

Describe the bug

nuxt doesn't build with the default configuration

Additional context

No response

Logs

nuxt build:

[4:00:57 PM]  ERROR  Nuxt Build Error: [vite]: Rollup failed to resolve import "node-appwrite" from "XXXXXX/components/Comments.vue?vue&type=script&setup=true&lang.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external

  This is most likely unintended because it can break your application at runtime.
  If you do want to externalize this module explicitly add it to
  build.rollupOptions.external
  at viteWarn (node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-jvB8WLp9.js:67190:27)
  at onRollupWarning (node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-jvB8WLp9.js:67218:9)
  at onwarn (node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-jvB8WLp9.js:66922:13)
  at node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:18303:13
  at Object.logger [as onLog] (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:19950:9)
  at ModuleLoader.handleInvalidResolvedId (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:18893:26)
  at node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:18851:26

mirsella avatar May 05 '24 14:05 mirsella

I see you doing import from node-appwrite dependency, which is not available (yet) from this module usage. #377 with node-appwrite still WIP

Hrdtr avatar May 08 '24 03:05 Hrdtr

oh just saw, it was because of the auto import that was importing node-appwrite from the my functions/ node_module.

so the bug report is more about ExecutionMethod not available in nuxt-appwrite

thanks !

mirsella avatar May 11 '24 14:05 mirsella