Skip to content

Error upgrading to 3.2.0/3.3.0 versions (source.include.startsWith is not a function) #3271

@thorge

Description

@thorge

Environment

  • Operating System: Linux
  • Node Version: v22.14.0
  • Nuxt Version: 3.16.1
  • CLI Version: 3.23.1
  • Nitro Version: 2.11.7
  • Package Manager: npm@10.9.2
  • Builder: -
  • User Config: ssr, hooks, srcDir, app, css, site, typescript, modules, content, googleFonts, image, ogImage, robots, i18n, vite, nitro, devServerHandlers, compatibilityDate
  • Runtime Modules: @pinia/nuxt@0.10.1, @nuxtjs/seo@2.1.1, @nuxt/content@3.1.0, @nuxtjs/i18n@9.3.2, @nuxt/image@1.9.0, @nuxtjs/google-fonts@3.2.0
  • Build Modules: -

Version

v3

Reproduction

I can't provide a reproduction, because Stackblitz is on node v18.20.3, while the error appears to happen only on newer node versions. I run node v22.14.0.

Description

When I try to upgrade nuxt-content from 3.1.0 to 3.2.0 or 3.3.0 and then run npm install I receive the error ERROR source.include.startsWith is not a function.

Additional context

No response

Logs

ERROR  source.include.startsWith is not a function                                                                              10:05:39 AM  
                                                                                                                                              
    at defineLocalSource (node_modules/@nuxt/content/dist/module.mjs:1763:22)                                                                 
    at node_modules/@nuxt/content/dist/module.mjs:1970:12                                                                                     
    at Array.map (<anonymous>)                                                                                                                
    at resolveSource (node_modules/@nuxt/content/dist/module.mjs:1963:18)                                                                     
    at defineCollection (node_modules/@nuxt/content/dist/module.mjs:1892:13)                                                                  
    at content.config.js:12:44                                                                                                                
    at async Function.import (node_modules/jiti/dist/jiti.cjs:1:199772)                                                                       
    at async resolveConfig (node_modules/c12/dist/shared/c12.PQMoYrit.mjs:346:18)                                                             
    at async loadConfig (node_modules/c12/dist/shared/c12.PQMoYrit.mjs:146:23)                                                                
    at async Promise.all (index 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions