scalar icon indicating copy to clipboard operation
scalar copied to clipboard

Nuxt Content + Scalar/Nuxt will not build "JavaScript heap out of memory"

Open Toocky opened this issue 6 months ago β€’ 1 comments

What happens?

You cannot build with both Nuxt/Content and Scalar/Nuxt configured.

Occasionally you can get it to work in Dev mode but its very slow and when you try build it always fails.

I've tried various combinations of versions of both packages but I'm unable to get content and scalar to work together.

You can easily replicate on a simple nuxt template https://github.com/nuxt-ui-templates/saas

Just add scalar to the package.json

"@scalar/nuxt": "0.5.15",

And add basic config to the nuxt config modules: [ '@nuxt/eslint', '@nuxt/image', '@nuxt/ui', '@nuxt/content', '@vueuse/nuxt', 'nuxt-og-image', '@scalar/nuxt' // add scalar ],

scalar: { url: 'https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.json', // fails with both test openapi and nitro pathRouting: { basePath: '/scalar', //change base path to avoid conflict with docs content }, },

remove Content and scalar will work perfectly. remove scalar and content will work perfectly.

Environment details


What did you expect to happen?

Content to build its associated pages and Scalar API documentation to build be fast/responsive and accessible on /scalar.

OpenAPI Document

https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.json

Toocky avatar Sep 25 '25 19:09 Toocky

This could be related to an unhead pinning dependancy issue, similar to this issue

Saganic avatar Oct 07 '25 15:10 Saganic

@Saganic did you have any luck getting this to work?

Toocky avatar Nov 29 '25 18:11 Toocky