Closed billysean closed 2 years ago
I'm already sent a pull request for this If you need an immediately fix on this:
In file nuxt.config.ts
Add transpile: ['@heroicons/vue']
in build
section, before postcss e.g.
Finally run yarn build
and yarn start
Full nuxt.config.ts
for example:
import { defineNuxtConfig } from "nuxt3";
export default defineNuxtConfig({
buildModules: [
// pinia plugin - https://pinia.esm.dev
"@pinia/nuxt",
],
build: {
transpile: ['@heroicons/vue'],
postcss: {
postcssOptions: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
},
},
vite: {
logLevel: "info",
optimizeDeps: {
include: [
'@headlessui/vue', '@heroicons/vue/solid', '@heroicons/vue/outline', 'vue', 'pinia'
]
}
}
});
Environment
Nuxt CLI v3.0.0-27376943.f219f63
RootDir: D:\project\nuxt3TemplateTailwind
Nuxt project info:
Windows_NT
v14.18.1
3.0.0-27376943.f219f63
npm@8.1.1
Vite
css
,build
,publicRuntimeConfig
-
Build Modules:
-
Describe the bug
INFO : This error is generated purely by cloning this git
ERROR DESC : building was successful but generates error when trying to run
npm run start
'D:\project\test\nuxt3-app.output\server\node_modules\@heroicons\vue\outline' is not supported resolving ES modules imported from D:\project\test\nuxt3-app.output\server\chunks\server2.mjs
both for @heroicons/vue & @headlessui/vue generates this error
Additional context
No response
Logs
No response