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

nuxt3 build报错:The symbol "createError" has already been declared #30

Open
zwying0814 opened this issue Jul 7, 2023 · 2 comments

Comments

@zwying0814
Copy link

感谢作者开发这款工具,我在nuxt3平台下使用时,遇到如下错误:

The symbol "createError" has already been declared

image

这是nuxt.config.ts文件内容:

// https://nuxt.com/docs/api/configuration/nuxt-config
import { vitePlugin as utwm } from 'unplugin-tailwindcss-mangle'
export default defineNuxtConfig({
  runtimeConfig: {
    public: {
      baseURL: process.env.BASE_URL || "http://127.0.0.1:19800/api",
    },
  },
  devtools: { enabled: true },
  pages: true,
  modules: [
    "@nuxtjs/tailwindcss",
    "nuxt-headlessui",
    "@nuxtjs/color-mode",
    "floating-vue/nuxt",
    "@pinia/nuxt",
    "@pinia-plugin-persistedstate/nuxt",
  ],
  app: {
    head: {
      link: [{ rel: "stylesheet", href: "/HarmonyOS/font.css" }],
    },
  },
  vite: {
    plugins: [utwm()],
  },
});

这有可能是什么原因导致的?

@sonofmagic
Copy link
Owner

目前 spa 运转还算良好,ssr 框架,想那些 nextjs 还要你用的 nuxtjs3 啥的,因为他们是打多个包的(server/client) 等等,目前混淆 server 端包的时候有各种奇怪的问题,比如你遇到的这个。

头疼,没找到好的解决方案。

@sonofmagic
Copy link
Owner

Hi, [email protected] is release, This version has fixed this issue. Have a try! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants