question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`addAutoImport` and `addAutoImportDir` are not provided by `@nuxt/kit`

See original GitHub issue

Environment

  • Operating System: Linux
  • Node Version: v18.11.0
  • Nuxt Version: 3.0.0-rc.14
  • Nitro Version: 1.0.0
  • Package Manager: npm@8.19.2
  • Builder: vite
  • User Config: srcDir, modules, compilerOptions, vue, vite, schemaOrg, telemetry, algolia, head, auth, css, build, runtimeConfig
  • Runtime Modules: genesis-design-system/nuxt, @nuxtjs/tailwindcss@6.1.3, @nuxtjs/algolia@1.1.5, @nuxtjs-alt/auth@2.1.3, @nuxtjs-alt/http@1.4.6, @nuxtjs/device@3.0.0, @nuxtjs/partytown@1.2.2, @vueuse/nuxt@9.5.0, nuxt-schema-org@1.1.0-beta.6, unplugin-icons/nuxt, @pinia/nuxt@0.4.3, @nuxtjs/i18n@8.0.0-beta.4
  • Build Modules: -

Reproduction

I have upgraded from RC 13 to RC 14 and the server doesn’t even start.

image

Describe the bug

I have upgraded from RC 13 to RC 14 and the server doesn’t even start.

Additional context

No response

Logs

ERROR  Error while requiring module @nuxtjs/algolia: SyntaxError: The requested module '@nuxt/kit' does not provide an export named 'addAutoImportDir'


 ERROR  Cannot restart nuxt:  The requested module '@nuxt/kit' does not provide an export named 'addAutoImportDir'

  import { defineNuxtModule, addComponentsDir, addPlugin, addAutoImportDir, addServerHandler } from '@nuxt/kit';
  ^^^^^^^^^^^^^^^^
  SyntaxError: The requested module '@nuxt/kit' does not provide an export named 'addAutoImportDir'
  at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
  at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
  at async Promise.all (index 0)
  at async ESMLoader.import (node:internal/modules/esm/loader:526:24)
  at async normalizeModule (node_modules/@nuxt/kit/dist/index.mjs:432:28)
  at async installModule (node_modules/@nuxt/kit/dist/index.mjs:415:41)
  at async initNuxt (node_modules/nuxt/dist/index.mjs:1827:7)
  at async load (node_modules/nuxi/dist/chunks/dev.mjs:6779:9)
  at async Object.invoke (node_modules/nuxi/dist/chunks/dev.mjs:6840:5)
  at async _main (node_modules/nuxi/dist/cli.mjs:50:20)

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:3
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
danielroecommented, Nov 17, 2022

We deprecated those helpers in RC9 over two months ago and provided alias methods. But of course we’ve removed them prior to the release and API stability.

2reactions
Corentin7301commented, Nov 16, 2022

Same error when I’ve uploaded to rc14 but the same The requested module '@nuxt/kit' does not provide an export named 'addAutoImport' error is always here when I downgrade to rc13… I use pnpm, I’ve deleted node-modules & pnpm-lock before execute pnpm install --shamefully-hoist. Have you a bypass solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Renovate Bot Package Diff
Define a Nuxt module, automatically merging defaults with user provided options, ... ResolvePathOptions, Resolver, addAutoImport , addAutoImportDir ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found