dword-design / nuxt-mail

Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails.
Other
247 stars 18 forks source link

Error installing nuxt-mail #221

Closed Kumzy closed 9 months ago

Kumzy commented 9 months ago

Hello,

trying to run pnpm add nuxt-mail and setting the configuration in nuxt-config.ts result in error

I have nuxt 3.10.2 installed and using node 18.18.0

My nuxt.config.ts

modules: [
    'nuxt-mail',
  ],
  mail: {
    message: {
      to: 'foo@bar.de',
    },
    smtp: {
      host: "smtp.example.com",
      port: 587,
    },
  },

When running pnpm run dev

[worker reload] [worker init] Cannot find package '@dword-design/functions' imported from /Users/julien/Documents/Sources/project.nuxt/nuxt-mail/send.mjs
Did you mean to import @dword-design+functions@4.1.7/node_modules/@dword-design/functions/dist/find-index.js?

  Did you mean to import @dword-design+functions@4.1.7/node_modules/@dword-design/functions/dist/find-index.js?
  at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
  at new NodeError (node:internal/errors:405:5)
  at packageResolve (node:internal/modules/esm/resolve:890:9)
  at moduleResolve (node:internal/modules/esm/resolve:939:20)
  at defaultResolve (node:internal/modules/esm/resolve:1132:11)
  at nextResolve (node:internal/modules/esm/loader:163:28)
  at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
  at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
  at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
  at link (node:internal/modules/esm/module_job:76:36)

I tried to install @dword-design/functions but got the following after

[worker reload] [worker init] Package subpath './dist/find-index.js' is not defined by "exports" in /Users/julien/Documents/Sources/project/node_modules/@dword-design/functions/package.json imported from /Users/julien/Documents/Sources/project/.nuxt/nuxt-mail/send.mjs

  at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
  at new NodeError (node:internal/errors:405:5)
  at exportsNotFound (node:internal/modules/esm/resolve:362:10)
  at packageExportsResolve (node:internal/modules/esm/resolve:698:9)
  at packageResolve (node:internal/modules/esm/resolve:873:14)
  at moduleResolve (node:internal/modules/esm/resolve:939:20)
  at defaultResolve (node:internal/modules/esm/resolve:1132:11)
  at nextResolve (node:internal/modules/esm/loader:163:28)
  at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
  at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
  at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
  at link (node:internal/modules/esm/module_job:76:36)

I do not know if I did something wrong.

Regards

Kumzy commented 9 months ago

It seems that forcing the installation of @dword-design/functions to version 5.0.27 fix the issue

dword-design commented 9 months ago

@Kumzy Should be fixed