Next.js Discord

Discord Forum

[Turborepo] TypeError: Cannot read properties of undefined (reading 'push')

Unanswered
Masai Lion posted this in #help-forum
Open in Discord
Masai LionOP
www:dev: TypeError: Cannot read properties of undefined (reading 'push')
www:dev:     at writeConfigurationDefaults


I'm not sure what's causing this error...
Using Turborepo.

apps/www/tsconfig,json
{
  "extends": "@repo/typescript-config/tsconfig.nextjs.json",
}


apps/www/package,json
{
  "devDependencies": {
    "@repo/typescript-config": "*",
  }
}


packages/typescript-config/package,json
{
    "name": "@repo/typescript-config",
    "version": "0.0.0",
    "private": true
}


packages/typescript-config/tsconfig.nextjs,json
{
    "$schema": "https://json.schemastore.org/tsconfig",
    "display": "Next.js",
    "extends": "./tsconfig.base.json",
    "compilerOptions": {
        /* Language compilation options */
        "module": "ESNext",   
        "moduleDetection": "force",
        "isolatedModules": true,     
        "jsx": "preserve",
        "incremental": true,

        /* Path aliases */
        "baseUrl": ".",
        "paths": {
            "~/*": ["./src*"]
        },

        /* Other options */
        "plugins": [{ "name": "next"}],
    },
    "include": [
        ".eslintrc.cjs",
        "next-env.d.ts",
        "**/*.ts",
        "**/*.tsx",
        "**/*.cjs",
        "**/*.js",
        ".next/types/**/*.ts"
      ],
      "exclude": ["node_modules"]
}

4 Replies

Philippine Crocodile
Are you trying to do some programatic navigation with router.push()?
Masai LionOP
no im just trying to do npm run dev
Philippine Crocodile
In that case I am out of my depth.
Check this out, perhaps there is some insight here. https://github.com/vercel/next.js/pull/48668