Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuxt/kit is missing addAutoImport - thats why nuxt3 stable doesnt build #15515

Closed
duderion opened this issue Nov 17, 2022 · 3 comments
Closed

Comments

@duderion
Copy link

Environment

$ npx nuxi info
Nuxi 3.0.0 13:00:28
13:00:29
RootDir: C:/Users/degieadr/Sites/fring 13:00:29
Nuxt project info: 13:00:29


  • Operating System: Windows_NT
  • Node Version: v16.13.0
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: nitro, buildModules, modules, css, build, vite, intlify, runtimeConfig, purgeCSS, googleFonts
  • Runtime Modules: @intlify/nuxt3@0.2.4, nuxt-jsonld@2.0.6, @pinia/nuxt@0.4.4
  • Build Modules: @pinia/nuxt@0.4.4, nuxt-purgecss@1.0.0, @nuxtjs/google-fonts@3.0.0-1

👉 Report an issue: https://github.com/nuxt/framework/issues/new 13:00:29

👉 Suggest an improvement: https://github.com/nuxt/framework/discussions/new

👉 Read documentation: https://v3.nuxtjs.org

Reproduction

i got a recommendation to file it over here. i have no minimal repro repo atm

Describe the bug

$ yarn build
yarn run v1.22.19
warning ....\package.json: No license field
$ nuxt build
Nuxi 3.0.0 13:01:43
Nuxt 3.0.0 with Nitro 1.0.0 13:01:43

ERROR Error while requiring module nuxt-jsonld: SyntaxError: The requested module '@nuxt/kit' does not provide an export named 'addAutoImport'

ERROR The requested module '@nuxt/kit' does not provide an export named 'addAutoImport' 13:01:50

import { defineNuxtModule, addPlugin, addAutoImport } from "@nuxt/kit";
^^^^^^^^^^^^^
SyntaxError: The requested module '@nuxt/kit' does not provide an export named 'addAutoImport'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:181:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
at async normalizeModule (/C:/Users/degieadr/Sites/fring/node_modules/@nuxt/kit/dist/index.mjs:432:28)
at async installModule (/C:/Users/degieadr/Sites/fring/node_modules/@nuxt/kit/dist/index.mjs:415:41)
at async initNuxt (/C:/Users/degieadr/Sites/fring/node_modules/nuxt/dist/index.mjs:1825:7)
at async loadNuxt (/C:/Users/degieadr/Sites/fring/node_modules/nuxt/dist/index.mjs:1857:5)
at async loadNuxt (/C:/Users/degieadr/Sites/fring/node_modules/@nuxt/kit/dist/index.mjs:493:19)
at async Object.invoke (/C:/Users/degieadr/Sites/fring/node_modules/nuxi/dist/chunks/build.mjs:34:18)

error Command failed with exit code 1.

Additional context

No response

Logs

No response

Copy link
Member

danielroe commented Nov 17, 2022

It should be addImports - the previous deprecated addAutoImport has been removed.

If you are using a module that is using addAutoImport then please raise an issue there. Feel free to tag me and I can help resolve it there.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2022
@duderion duderion changed the title nuxt/kit is missing addImport - thats why nuxt3 stable doesnt build nuxt/kit is missing addAutoImport - thats why nuxt3 stable doesnt build Nov 17, 2022
@duderion
Copy link
Author

$ grep -ri addAutoImport *
nuxt-jsonld/dist/module.mjs:import { defineNuxtModule, addPlugin, addAutoImport } from "@nuxt/kit";
nuxt-jsonld/dist/module.mjs: addAutoImport({

@duderion
Copy link
Author

ymmooot/nuxt-jsonld#1014

they're on it 👯‍♀️

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants