timmaier
timmaier
NNuxt
Created by timmaier on 9/6/2024 in #❓・help
Nuxt build error (At least one <template> or <script> is required in a single file component)
Thanks mate this got me past the error too now I'm getting a memory issue when building 😂
ℹ ✓ built in 13.24s 10:05:25 PM
✔ Server built in 13250ms 10:05:25 PM
ℹ Initializing prerenderer nitro 10:05:25 PM

<--- Last few GCs --->

[3083:0x148008000] 69211 ms: Mark-Compact 4038.5 (4135.9) -> 4036.6 (4135.6) MB, 769.67 / 0.00 ms (average mu = 0.500, current mu = 0.140) allocation failure; scavenge might not succeed
[3083:0x148008000] 70865 ms: Mark-Compact 4052.3 (4135.6) -> 4050.5 (4163.9) MB, 1649.92 / 0.00 ms (average mu = 0.218, current mu = 0.002) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
ℹ ✓ built in 13.24s 10:05:25 PM
✔ Server built in 13250ms 10:05:25 PM
ℹ Initializing prerenderer nitro 10:05:25 PM

<--- Last few GCs --->

[3083:0x148008000] 69211 ms: Mark-Compact 4038.5 (4135.9) -> 4036.6 (4135.6) MB, 769.67 / 0.00 ms (average mu = 0.500, current mu = 0.140) allocation failure; scavenge might not succeed
[3083:0x148008000] 70865 ms: Mark-Compact 4052.3 (4135.6) -> 4050.5 (4163.9) MB, 1649.92 / 0.00 ms (average mu = 0.218, current mu = 0.002) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
19 replies
NNuxt
Created by timmaier on 9/6/2024 in #❓・help
Nuxt build error (At least one <template> or <script> is required in a single file component)
19 replies
NNuxt
Created by timmaier on 9/6/2024 in #❓・help
Nuxt build error (At least one <template> or <script> is required in a single file component)
these are my modules
19 replies
NNuxt
Created by timmaier on 9/6/2024 in #❓・help
Nuxt build error (At least one <template> or <script> is required in a single file component)
modules: [
'@nuxt/image',
'@nuxtjs/i18n',
'@nuxt/ui',
'@vueuse/nuxt',
'@vue-macros/nuxt',
'@nuxtjs/tailwindcss',
'@nuxtjs/robots',
'@pinia/nuxt',
'@nuxt/content',
'nuxt-headlessui',
'nuxt-og-image',
'@nuxthq/studio'
],
modules: [
'@nuxt/image',
'@nuxtjs/i18n',
'@nuxt/ui',
'@vueuse/nuxt',
'@vue-macros/nuxt',
'@nuxtjs/tailwindcss',
'@nuxtjs/robots',
'@pinia/nuxt',
'@nuxt/content',
'nuxt-headlessui',
'nuxt-og-image',
'@nuxthq/studio'
],
19 replies
NNuxt
Created by timmaier on 9/6/2024 in #❓・help
Nuxt build error (At least one <template> or <script> is required in a single file component)
Not at the computer just now but will do a bit more debugging later @amplitudes
19 replies
NNuxt
Created by timmaier on 9/6/2024 in #❓・help
Nuxt build error (At least one <template> or <script> is required in a single file component)
After updating again I get
[7:30:12 AM] ERROR Cannot start nuxt: require() of ES Module /Users/tim/Code/site/node_modules/.pnpm/[email protected]/node_modules/html-tags/index.js from /Users/tim/Code/site/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@vue/babel-plugin-jsx/dist/index.js not supported.
Instead change the require of /Users/tim/Code/site/node_modules/.pnpm/[email protected]/node_modules/html-tags/index.js in /Users/tim/Code/site/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@vue/babel-plugin-jsx/dist/index.js to a dynamic import() which is available in all CommonJS modules.

Instead change the require of node_modules/.pnpm/[email protected]/node_modules/html-tags/index.js in /Users/tim/Code/site/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@vue/babel-plugin-jsx/dist/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@vue/babel-plugin-jsx/dist/index.js:66:32)
[7:30:12 AM] ERROR Cannot start nuxt: require() of ES Module /Users/tim/Code/site/node_modules/.pnpm/[email protected]/node_modules/html-tags/index.js from /Users/tim/Code/site/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@vue/babel-plugin-jsx/dist/index.js not supported.
Instead change the require of /Users/tim/Code/site/node_modules/.pnpm/[email protected]/node_modules/html-tags/index.js in /Users/tim/Code/site/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@vue/babel-plugin-jsx/dist/index.js to a dynamic import() which is available in all CommonJS modules.

Instead change the require of node_modules/.pnpm/[email protected]/node_modules/html-tags/index.js in /Users/tim/Code/site/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@vue/babel-plugin-jsx/dist/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@vue/babel-plugin-jsx/dist/index.js:66:32)
19 replies
NNuxt
Created by timmaier on 9/6/2024 in #❓・help
Nuxt build error (At least one <template> or <script> is required in a single file component)
Hey thanks for the responses. Callout.vue is from nuxt ui pro package. There is no empty script tag. Project was working fine in same state before nuxi upgrade.
19 replies
NNuxt
Created by timmaier on 9/6/2024 in #❓・help
Nuxt build error (At least one <template> or <script> is required in a single file component)
If I update all packages to latest version in package.json. Running dev server spits out:
[10:13:28 PM] ERROR Pre-transform error: At least one <template> or <script> is required in a single file component. /User/node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]_vit_ezp4jev2muxyj6xr72tb6wniau/node_modules/@nuxt/ui-pro/modules/pro/runtime/components/global/Callout.vue
[10:13:28 PM] ERROR Pre-transform error: At least one <template> or <script> is required in a single file component. /User/node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]_vit_ezp4jev2muxyj6xr72tb6wniau/node_modules/@nuxt/ui-pro/modules/pro/runtime/components/global/Callout.vue
19 replies
NNuxt
Created by timmaier on 9/6/2024 in #❓・help
Nuxt build error (At least one <template> or <script> is required in a single file component)
Here's some debug during dev 500
[vite-node] [plugin:vite:vue] [SyntaxError] /@fs./node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]_vit_ezp4jev2muxyj6xr72tb6wniau/node_modules/@nuxt/ui-pro/modules/pro/runtime/components/global/Callout.vue?nuxt_component=async&nuxt_component_name=Callout&nuxt_component_export=default

import { defineAsyncComponent } from "vue"
export default defineAsyncComponent(() => import("/node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]_vit_ezp4jev2muxyj6xr72tb6wniau/node_modules/@nuxt/ui-pro/modules/pro/runtime/components/global/Callout.vue").then(r => r["default"] || r.default || r))
[vite-node] [plugin:vite:vue] [SyntaxError] /@fs./node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]_vit_ezp4jev2muxyj6xr72tb6wniau/node_modules/@nuxt/ui-pro/modules/pro/runtime/components/global/Callout.vue?nuxt_component=async&nuxt_component_name=Callout&nuxt_component_export=default

import { defineAsyncComponent } from "vue"
export default defineAsyncComponent(() => import("/node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]_vit_ezp4jev2muxyj6xr72tb6wniau/node_modules/@nuxt/ui-pro/modules/pro/runtime/components/global/Callout.vue").then(r => r["default"] || r.default || r))
19 replies
NNuxt
Created by timmaier on 6/1/2023 in #❓・help
sendRedirect not redirecting to page in ssr
For anyone that comes across this thread: https://github.com/nuxt/nuxt/issues/21334
2 replies