cli icon indicating copy to clipboard operation
cli copied to clipboard

deno: can't install Vuetify module

Open d9k opened this issue 11 months ago • 4 comments

App created with

deno -A npm:nuxi@latest init

When I try

deno run -A npm:nuxi@latest module add vuetify-nuxt-module

I get an error:

Could not find referrer npm package 'file:///home/d9k/cr/demo/nuxt-eshop-demo/node_modules/.deno/[email protected]/node_modules/jiti/dist/babel.cjs'.

More error log:

ℹ Resolved vuetify-nuxt-module, adding module...                       nuxi  9:05:28 AM
ℹ vuetify-nuxt-module is already installed                             nuxi  9:05:28 AM
ℹ Adding vuetify-nuxt-module to the modules                            nuxi  9:05:28 AM

[9:05:28 AM]  ERROR  Could not find referrer npm package 'file:///home/d9k/cr/demo/nuxt-eshop-demo/node_modules/.deno/[email protected]/node_modules/jiti/dist/babel.cjs'.

    at async import (/home/d9k/.cache/deno/npm/registry.npmjs.org/nuxi/3.23.1/dist/shared/nuxi.C4l48OVX.mjs:33:199906)
    at async node_modules/.deno/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:13:13
    at async Function.import (/home/d9k/.cache/deno/npm/registry.npmjs.org/nuxi/3.23.1/dist/shared/nuxi.C4l48OVX.mjs:33:199906)
    at async loadKit (/home/d9k/.cache/deno/npm/registry.npmjs.org/nuxi/3.23.1/dist/shared/nuxi.BxIDvNqq.mjs:26:15)
    at async Object.run (/home/d9k/.cache/deno/npm/registry.npmjs.org/nuxi/3.23.1/dist/chunks/prepare.mjs:46:49)
    at async runCommand$1 (/home/d9k/.cache/deno/npm/registry.npmjs.org/nuxi/3.23.1/dist/shared/nuxi.B1IlPxHz.mjs:1764:16)
    at async runCommand (/home/d9k/.cache/deno/npm/registry.npmjs.org/nuxi/3.23.1/dist/shared/nuxi.B1IlPxHz.mjs:3541:10)
    at async Object.setup (/home/d9k/.cache/deno/npm/registry.npmjs.org/nuxi/3.23.1/dist/chunks/add2.mjs:157:7)
    at async runCommand$1 (/home/d9k/.cache/deno/npm/registry.npmjs.org/nuxi/3.23.1/dist/shared/nuxi.B1IlPxHz.mjs:1736:5)
    at async runCommand$1 (/home/d9k/.cache/deno/npm/registry.npmjs.org/nuxi/3.23.1/dist/shared/nuxi.B1IlPxHz.mjs:1755:11)

When I try to deno run dev I get an error

 ERROR  Cannot start nuxt:  Cannot find module 'vuetify/package.json'   nuxi  9:15:34 AM
Require stack:
- /home/d9k/cr/demo/nuxt-eshop-demo/node_modules/.deno/@[email protected]/node_modules/@vuetify/loader-shared/dist/index.mjs

    at Function.Module._resolveFilename (node:module:617:15)
    at Function.resolve (node:module:813:19)
    at resolveVuetifyBase (node_modules/.deno/@[email protected]/node_modules/@vuetify/loader-shared/dist/index.mjs:95:31)
    at resolveVuetifyComponents (node_modules/.deno/[email protected]/node_modules/vuetify-nuxt-module/dist/module.mjs:199:23)
    at load (node_modules/.deno/[email protected]/node_modules/vuetify-nuxt-module/dist/module.mjs:440:9)
    at eventLoopTick (ext:core/01_core.js:177:7)
    at async setup (node_modules/.deno/[email protected]/node_modules/vuetify-nuxt-module/dist/module.mjs:1470:5)
    at async normalizedModule (node_modules/.deno/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2163:17)
    at async installModule (node_modules/.deno/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2488:276)
    at async initNuxt (node_modules/.deno/[email protected]/node_modules/nuxt/dist/shared/nuxt.DQBGBwNc.mjs:5785:5)

d9k avatar Apr 01 '25 04:04 d9k

> deno --version
deno 2.1.10 (stable, release, x86_64-unknown-linux-gnu)
v8 13.0.245.12-rusty
typescript 5.6.2

nuxt.config.ts:

export default defineNuxtConfig({
  modules: ['vuetify-nuxt-module'],
  compatibilityDate: '2024-11-01',
  devtools: { enabled: true }
})

d9k avatar Apr 01 '25 04:04 d9k

~~With Node v20.13.1, pnpm 10.7.1 same issue:~~

> pnpm dlx nuxi init
> pnpm dlx nuxi module add vuetify-nuxt-module
 ERROR  Cannot find module 'vuetify/package.json'                                              1:35:46 PM
Require stack:
- /home/d9k/cr/demo/nuxt-eshop-demo/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@vuetify/loader-shared/dist/index.mjs

    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Function.resolve (node:internal/modules/helpers:190:19)
    at resolveVuetifyBase (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@vuetify/loader-shared/dist/index.mjs:95:31)
    at resolveVuetifyComponents (node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/vuetify-nuxt-module/dist/module.mjs:199:23)
    at load (node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/vuetify-nuxt-module/dist/module.mjs:440:9)
    at async setup (node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/vuetify-nuxt-module/dist/module.mjs:1490:5)
    at async normalizedModule (node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2163:17)
    at async installModule (node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2488:276)
    at async initNuxt (node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]__88e2248651b29e601117cbb91be2ee10/node_modules/nuxt/dist/shared/nuxt.iYoBCR2R.mjs:5833:5)
    at async loadNuxt (node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]__88e2248651b29e601117cbb91be2ee10/node_modules/nuxt/dist/shared/nuxt.iYoBCR2R.mjs:6036:5)
    at async loadNuxt (node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2713:19)
    at async Object.run (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/prepare.mjs:47:18)
    at async runCommand$1 (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:1767:16)
    at async runCommand (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:2097:10)
    at async Object.setup (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/add2.mjs:156:7)
    at async runCommand$1 (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:1739:5)
    at async runCommand$1 (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:1758:11)
    at async runCommand$1 (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:1758:11)
    at async runMain$1 (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:1896:7)

Update: fixed with preliminary vuetify installation: pnpm add -d vuetify

d9k avatar Apr 02 '25 08:04 d9k

~~Can't install @nuxtjs/vuetify too:~~

> pnpm dlx nuxi module add @nuxtjs/vuetify
 ERROR  Cannot read properties of undefined (reading 'nuxt')             1:49:29 PM

    at vuetifyModule (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@nuxtjs/vuetify/dist/index.js:7:8)
    at installModule (node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2488:282)
    at async initNuxt (node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]_magicast_f3005155f8689ec1cd7919130482a386/node_modules/nuxt/dist/shared/nuxt.iYoBCR2R.mjs:5833:5)
    at async loadNuxt (node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]_magicast_f3005155f8689ec1cd7919130482a386/node_modules/nuxt/dist/shared/nuxt.iYoBCR2R.mjs:6036:5)
    at async loadNuxt (node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2713:19)
    at async Object.run (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/prepare.mjs:47:18)
    at async runCommand$1 (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:1767:16)
    at async runCommand (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:2097:10)
    at async Object.setup (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/add2.mjs:156:7)
    at async runCommand$1 (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:1739:5)
    at async runCommand$1 (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:1758:11)
    at async runCommand$1 (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:1758:11)
    at async runMain$1 (/home/d9k/.cache/pnpm/dlx/a5de304402daa4df981d7d0732989223154dcbb4ea7b47722161878e85e2254f/195f59dac70-263a4f/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.CSptgxBl.mjs:1896:7)

nuxt 3.16.2, nuxi 3.24.0, vuetify-nuxt-module 0.18.5

Update: fixed with preliminary vuetify installation: pnpm add -d vuetify

d9k avatar Apr 02 '25 08:04 d9k

deno install npm:jiti
deno run -A npm:nuxi@latest module add vuetify-nuxt-module

Shows error

Could not find referrer npm package 'file:///home/d9k/cr/demo/nuxt-eshop-demo/node_modules/.deno/[email protected]/node_modules/jiti/dist/babel.cjs'

— may be related to https://github.com/unjs/jiti/issues/168

But deno run dev works.

d9k avatar Apr 03 '25 08:04 d9k