Skip to content

[BUG] npm@11.6.3 fails to install with overrides having npm error Cannot read properties of undefined (reading 'ruleset') #8757

Closed

Description

@ShGKme

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

  • On npm v11.6.3 npm ci fails
  • On v11.6.2 and lower no errors

Expected Behavior

npm ci works with overrides.

Steps To Reproduce

  1. package.json:
Details
{
  "name": "@nextcloud/vue",
  "version": "9.2.0",
  "description": "Nextcloud vue components",
  "keywords": [
    "vuejs",
    "nextcloud",
    "components"
  ],
  "homepage": "https://github.com/nextcloud-libraries/nextcloud-vue",
  "bugs": "https://github.com/nextcloud-libraries/nextcloud-vue/issues",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/nextcloud-libraries/nextcloud-vue.git"
  },
  "license": "AGPL-3.0-or-later",
  "author": "Nextcloud GmbH and Nextcloud contributors",
  "type": "module",
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/index.mjs"
    },
    "./components/*": {
      "types": "./dist/components/*/index.d.ts",
      "import": "./dist/components/*/index.mjs"
    },
    "./composables/*": {
      "types": "./dist/composables/*/index.d.ts",
      "import": "./dist/composables/*/index.mjs"
    },
    "./directives/*": {
      "types": "./dist/directives/*/index.d.ts",
      "import": "./dist/directives/*/index.mjs"
    },
    "./functions/*": {
      "types": "./dist/functions/*/index.d.ts",
      "import": "./dist/functions/*/index.mjs"
    }
  },
  "files": [
    "CHANGELOG.md",
    "LICENSE",
    "README.md",
    "dist"
  ],
  "scripts": {
    "build": "vite build --mode production ",
    "dev": "vite build --mode development",
    "l10n:extract": "node build/extract-l10n.mjs",
    "lint": "eslint",
    "lint:fix": "eslint --fix",
    "prerelease:format-changelog": "node build/format-changelog.mjs",
    "styleguide": "vue-styleguidist --config styleguide.config.cjs server",
    "styleguide:build": "vue-styleguidist --config styleguide.config.cjs build",
    "stylelint": "stylelint \"src/**/*.vue\" \"src/**/*.scss\" \"src/**/*.css\"",
    "stylelint:fix": "stylelint \"src/**/*.vue\" \"src/**/*.scss\" \"src/**/*.css\" --fix",
    "test": "vitest run",
    "test:component": "playwright test -c playwright.config.ts",
    "test:component:gui": "playwright test --ui -c playwright.config.ts",
    "test:coverage": "vitest run --coverage",
    "ts:check": "vue-tsc -p src/tsconfig.json --noEmit",
    "update:snapshots": "npm run test:component -- --grep @visual --update-snapshots",
    "watch": "vite build --mode development --watch"
  },
  "browserslist": [
    "extends @nextcloud/browserslist-config"
  ],
  "overrides": {
    "@playwright/experimental-ct-core": {
      "vite": "^6.3.4 || ^7.0.0"
    },
    "mdast-util-gfm": {
      "mdast-util-gfm-autolink-literal": "2.0.0"
    }
  },
  "dependencies": {
    "@ckpack/vue-color": "^1.6.0",
    "@floating-ui/dom": "^1.7.4",
    "@nextcloud/auth": "^2.5.3",
    "@nextcloud/axios": "^2.5.2",
    "@nextcloud/browser-storage": "^0.5.0",
    "@nextcloud/capabilities": "^1.2.1",
    "@nextcloud/event-bus": "^3.3.3",
    "@nextcloud/initial-state": "^3.0.0",
    "@nextcloud/l10n": "^3.4.1",
    "@nextcloud/logger": "^3.0.2",
    "@nextcloud/router": "^3.1.0",
    "@nextcloud/sharing": "^0.3.0",
    "@vuepic/vue-datepicker": "^11.0.3",
    "@vueuse/components": "^14.0.0",
    "@vueuse/core": "^14.0.0",
    "blurhash": "^2.0.5",
    "clone": "^2.1.2",
    "debounce": "^3.0.0",
    "dompurify": "^3.3.0",
    "emoji-mart-vue-fast": "^15.0.5",
    "escape-html": "^1.0.3",
    "floating-vue": "^5.2.2",
    "focus-trap": "^7.6.6",
    "linkifyjs": "^4.3.2",
    "p-queue": "^9.0.0",
    "rehype-external-links": "^3.0.0",
    "rehype-highlight": "^7.0.2",
    "rehype-react": "^8.0.0",
    "remark-breaks": "^4.0.0",
    "remark-parse": "^11.0.0",
    "remark-rehype": "^11.1.2",
    "remark-unlink-protocols": "^1.0.0",
    "splitpanes": "^4.0.4",
    "striptags": "^3.2.0",
    "tabbable": "^6.3.0",
    "tributejs": "^5.1.3",
    "ts-md5": "^2.0.1",
    "unified": "^11.0.5",
    "unist-builder": "^4.0.0",
    "unist-util-visit": "^5.0.0",
    "vue": "^3.5.18",
    "vue-router": "^4.6.3",
    "vue-select": "^4.0.0-beta.6"
  },
  "devDependencies": {
    "@babel/plugin-syntax-import-assertions": "^7.27.1",
    "@babel/plugin-transform-typescript": "^7.28.0",
    "@babel/preset-typescript": "^7.28.5",
    "@fontsource/roboto": "^5.2.8",
    "@mdi/js": "^7.4.47",
    "@mdi/svg": "^7.4.47",
    "@nextcloud/babel-config": "^1.3.0",
    "@nextcloud/browserslist-config": "^3.1.2",
    "@nextcloud/eslint-config": "^9.0.0-rc.5",
    "@nextcloud/stylelint-config": "^3.1.1",
    "@nextcloud/vite-config": "^2.5.0",
    "@nextcloud/webpack-vue-config": "github:nextcloud/webpack-vue-config#vue3",
    "@playwright/experimental-ct-vue": "^1.56.1",
    "@playwright/test": "^1.56.1",
    "@types/gettext-parser": "^8.0.0",
    "@types/node": "^24.10.1",
    "@vitest/coverage-v8": "^4.0.10",
    "@vue/test-utils": "^2.4.6",
    "@vue/tsconfig": "^0.8.1",
    "babel-loader-exclude-node-modules-except": "^1.2.1",
    "core-js": "^3.46.0",
    "eslint": "^9.39.1",
    "file-loader": "^6.2.0",
    "gettext-extractor": "^4.0.1",
    "gettext-parser": "^8.0.0",
    "glob": "^12.0.0",
    "jsdom": "^27.2.0",
    "remark-gfm": "^4.0.1",
    "resolve-url-loader": "^5.0.0",
    "sass": "^1.94.1",
    "stylelint": "^16.25.0",
    "ts-node": "^10.9.2",
    "typescript": "^5.9.3",
    "url-loader": "^4.1.1",
    "vite": "^7.2.2",
    "vitest": "^4.0.4",
    "vue-eslint-parser": "^10.2.0",
    "vue-material-design-icons": "^5.3.1",
    "vue-styleguidist": "^4.72.4",
    "vue-tsc": "^3.1.4",
    "webpack": "^5.102.1",
    "webpack-merge": "^6.0.1"
  },
  "engines": {
    "node": "^20.11.0 || ^22 || ^24"
  },
  "devEngines": {
    "packageManager": [
      {
        "name": "npm",
        "version": "^11.3.0",
        "onFail": "error"
      }
    ],
    "runtime": {
      "name": "node",
      "version": "^24",
      "onFail": "error"
    }
  }
}
  1. Run npm ci
  2. See error:
Details
0 verbose cli /home/shgk/.volta/tools/image/node/24.11.1/bin/node /home/shgk/.volta/tools/image/npm/11.6.3/bin/npm-cli.js
1 info using npm@11.6.3
2 info using node@v24.11.1
3 silly config load:file:/home/shgk/.volta/tools/image/npm/11.6.3/npmrc
4 silly config load:file:/home/shgk/nextcloud/nextcloud-vue/.npmrc
5 silly config load:file:/home/shgk/.npmrc
6 silly config load:file:/home/shgk/.volta/tools/image/node/24.11.1/etc/npmrc
7 verbose title npm ci
8 verbose argv "ci"
9 verbose logfile logs-max:10 dir:/home/shgk/.npm/_logs/2025-11-20T10_57_24_409Z-
10 verbose logfile /home/shgk/.npm/_logs/2025-11-20T10_57_24_409Z-debug-0.log
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
13 silly packumentCache heap:4496293888 maxSize:1124073472 maxEntrySize:562036736
14 silly Conflicting override sets <ref *1> OverrideSet {
14 silly Conflicting override sets   parent: undefined,
14 silly Conflicting override sets   children: Map(2) {
14 silly Conflicting override sets     '@playwright/experimental-ct-core' => OverrideSet {
14 silly Conflicting override sets       parent: [Circular *1],
14 silly Conflicting override sets       children: [Map],
14 silly Conflicting override sets       name: '@playwright/experimental-ct-core',
14 silly Conflicting override sets       key: '@playwright/experimental-ct-core',
14 silly Conflicting override sets       keySpec: '*',
14 silly Conflicting override sets       value: '*'
14 silly Conflicting override sets     },
14 silly Conflicting override sets     'mdast-util-gfm' => OverrideSet {
14 silly Conflicting override sets       parent: [Circular *1],
14 silly Conflicting override sets       children: [Map],
14 silly Conflicting override sets       name: 'mdast-util-gfm',
14 silly Conflicting override sets       key: 'mdast-util-gfm',
14 silly Conflicting override sets       keySpec: '*',
14 silly Conflicting override sets       value: '*'
14 silly Conflicting override sets     }
14 silly Conflicting override sets   }
14 silly Conflicting override sets } undefined
15 verbose stack TypeError: Cannot read properties of undefined (reading 'ruleset')
15 verbose stack     at OverrideSet.haveConflictingRules (/home/shgk/.volta/tools/image/npm/11.6.3/node_modules/@npmcli/arborist/lib/override-set.js:220:32)
15 verbose stack     at OverrideSet.doOverrideSetsConflict (/home/shgk/.volta/tools/image/npm/11.6.3/node_modules/@npmcli/arborist/lib/override-set.js:214:17)
15 verbose stack     at get error (/home/shgk/.volta/tools/image/npm/11.6.3/node_modules/@npmcli/arborist/lib/edge.js:278:74)
15 verbose stack     at get valid (/home/shgk/.volta/tools/image/npm/11.6.3/node_modules/@npmcli/arborist/lib/edge.js:251:18)
15 verbose stack     at visit (/home/shgk/.volta/tools/image/npm/11.6.3/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:342:71)
15 verbose stack     at visitNode (/home/shgk/.volta/tools/image/npm/11.6.3/node_modules/treeverse/lib/depth-descent.js:58:25)
15 verbose stack     at next (/home/shgk/.volta/tools/image/npm/11.6.3/node_modules/treeverse/lib/depth-descent.js:44:19)
15 verbose stack     at depth (/home/shgk/.volta/tools/image/npm/11.6.3/node_modules/treeverse/lib/depth-descent.js:83:10)
15 verbose stack     at depth (/home/shgk/.volta/tools/image/npm/11.6.3/node_modules/treeverse/lib/depth.js:27:12)
15 verbose stack     at /home/shgk/.volta/tools/image/npm/11.6.3/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:330:9
16 error Cannot read properties of undefined (reading 'ruleset')
17 silly unfinished npm timer idealTree:init 1763636245159
18 verbose cwd /home/shgk/nextcloud/nextcloud-vue
19 verbose os Linux 6.12.11-200.fc41.x86_64
20 verbose node v24.11.1
21 verbose npm  v11.6.3
22 verbose exit 1
23 verbose code 1
24 error A complete log of this run can be found in: /home/shgk/.npm/_logs/2025-11-20T10_57_24_409Z-debug-0.log

Environment

  • npm: v11.6.3
  • Node.js: v24.11.1
  • OS Name: Fedora 39
  • System Model Name: Cloud server
  • npm config:

Activity

  1. added
    Bugthing that needs fixing
    Needs Triageneeds review for next steps
    on Nov 20, 2025
  2. marked [BUG] v11.6.3 breaks CI #8758 as a duplicate of this issue on Nov 20, 2025
  3. BarneyPowell commented on Nov 20, 2025

    @BarneyPowell

    Just to report, this is happening for me also.

    $ npm --version
    11.6.1
    $ npm i -g npm@11.6.3
    
    removed 10 packages, and changed 61 packages in 3s
    
    25 packages are looking for funding
      run `npm fund` for details
    $ npm --version
    $ npm install
    npm error Cannot read properties of undefined (reading 'ruleset')
    npm error A complete log of this run can be found in: /Users/barney.powell/.npm/_logs/2025-11-20T12_47_21_151Z-debug-0.log

    Snipped of the log:

    Details

    20 silly Conflicting override sets <ref *1> OverrideSet {
    20 silly Conflicting override sets   parent: undefined,
    20 silly Conflicting override sets   children: Map(4) {
    20 silly Conflicting override sets     'react' => OverrideSet {
    20 silly Conflicting override sets       parent: [Circular *1],
    20 silly Conflicting override sets       children: Map(0) {},
    20 silly Conflicting override sets       name: 'react',
    20 silly Conflicting override sets       key: 'react',
    20 silly Conflicting override sets       keySpec: '*',
    20 silly Conflicting override sets       value: '^18.3.1'
    20 silly Conflicting override sets     },
    20 silly Conflicting override sets     'react-dom' => OverrideSet {
    20 silly Conflicting override sets       parent: [Circular *1],
    20 silly Conflicting override sets       children: Map(0) {},
    20 silly Conflicting override sets       name: 'react-dom',
    20 silly Conflicting override sets       key: 'react-dom',
    20 silly Conflicting override sets       keySpec: '*',
    20 silly Conflicting override sets       value: '^18.3.1'
    20 silly Conflicting override sets     },
    20 silly Conflicting override sets     'axios' => OverrideSet {
    20 silly Conflicting override sets       parent: [Circular *1],
    20 silly Conflicting override sets       children: Map(0) {},
    20 silly Conflicting override sets       name: 'axios',
    20 silly Conflicting override sets       key: 'axios',
    20 silly Conflicting override sets       keySpec: '*',
    20 silly Conflicting override sets       value: '^1.12.0'
    20 silly Conflicting override sets     },
    20 silly Conflicting override sets     'form-data' => OverrideSet {
    20 silly Conflicting override sets       parent: [Circular *1],
    20 silly Conflicting override sets       children: Map(0) {},
    20 silly Conflicting override sets       name: 'form-data',
    20 silly Conflicting override sets       key: 'form-data',
    20 silly Conflicting override sets       keySpec: '*',
    20 silly Conflicting override sets       value: '4.0.4'
    20 silly Conflicting override sets     }
    20 silly Conflicting override sets   }
    20 silly Conflicting override sets } undefined
    21 verbose stack TypeError: Cannot read properties of undefined (reading 'ruleset')
    21 verbose stack     at OverrideSet.haveConflictingRules (/Users/barney.powell/.asdf/installs/nodejs/24.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/override-set.js:220:32)
    21 verbose stack     at OverrideSet.doOverrideSetsConflict (/Users/barney.powell/.asdf/installs/nodejs/24.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/override-set.js:214:17)
    21 verbose stack     at get error (/Users/barney.powell/.asdf/installs/nodejs/24.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/edge.js:278:74)
    21 verbose stack     at get valid (/Users/barney.powell/.asdf/installs/nodejs/24.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/edge.js:251:18)
    21 verbose stack     at visit (/Users/barney.powell/.asdf/installs/nodejs/24.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:342:71)
    21 verbose stack     at visitNode (/Users/barney.powell/.asdf/installs/nodejs/24.9.0/lib/node_modules/npm/node_modules/treeverse/lib/depth-descent.js:58:25)
    21 verbose stack     at next (/Users/barney.powell/.asdf/installs/nodejs/24.9.0/lib/node_modules/npm/node_modules/treeverse/lib/depth-descent.js:44:19)
    21 verbose stack     at depth (/Users/barney.powell/.asdf/installs/nodejs/24.9.0/lib/node_modules/npm/node_modules/treeverse/lib/depth-descent.js:83:10)
    21 verbose stack     at depth (/Users/barney.powell/.asdf/installs/nodejs/24.9.0/lib/node_modules/npm/node_modules/treeverse/lib/depth.js:27:12)
    21 verbose stack     at /Users/barney.powell/.asdf/installs/nodejs/24.9.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:330:9
    22 error Cannot read properties of undefined (reading 'ruleset')
    

    Running this on MacOS, but also fails on Ubuntu in our CI environment.
  4. BarneyPowell commented on Nov 20, 2025

    @BarneyPowell

    Issue appears to be originating from this PR in Arborist, specifically this line. It looks like there's an assumption that a second override set must exist, but in this case doOverrideSetsConflict is being called with one set of overrides and a second undefined object.

  5. mdesousa commented on Nov 20, 2025

    @mdesousa

    we are facing the same issue, started with 11.6.3

  6. self-assigned this
    on Nov 20, 2025
  7. hoylemd commented on Nov 20, 2025

    @hoylemd

    If anyone needs to be unblocked while a fix works its way out, downgrading to 11.6.2 worked fine for me

    npm install -g npm@11.6.2
    
  8. thany commented on Nov 21, 2025

    @thany

    Same problem with npm ls

  9. throrin19 commented on Nov 24, 2025

    @throrin19

    same problem with npm 11.6.3

  10. jurajpaska8 commented on Nov 25, 2025

    @jurajpaska8

    I confirm, issue present at npm: 11.6.3

  11. thany commented on Nov 25, 2025

    @thany

    I honestly can't believe npm 11.6.3 hasn't been pulled off the npm registry yet? Anyone innocently doing a npm update -g will run into this.

  12. ShGKme commented on Nov 25, 2025

    @ShGKme
    Author

    I honestly can't believe npm 11.6.3 hasn't been pulled off the npm registry yet?

    It is not a critical or security issue

  13. tirithen commented on Nov 25, 2025

    @tirithen

    Having one foot in the Node.js/npm echosystems and another in Rust/cargo echosystem I simply cannot get how npm that has so many users still choose to keep breaking thousands of projects with each major release. Also that you even choose to do major releases yearly. In the cargo world projects just build, without issues. The edition system allows for language flavors, but still keep old projects building.

    These is no technical reason why Rust manages to pull this off flawless and npm keeps failing, this is about engineering decisions and user responsibilities.

    Please reconsider how you make breaking changes in this project, each time you choose to break you create thousands of debugging hours in thousands of projects. Please maintain npm in a more responsible way. An please patch this breakage as soon as possible.

    Thanks otherwise for many years of a good tool, but do realize that with use base size comes responsibilities and increased demand on responsible engineering! Boring is good!

    Keep improving, I believe you and the community can do this! :-)

  14. thany commented on Nov 25, 2025

    @thany

    I honestly can't believe npm 11.6.3 hasn't been pulled off the npm registry yet?

    It is not a critical or security issue

    It only makes npm almost unusable, so I guess all is good 🤨

  15. MirKml commented on Nov 25, 2025

    @MirKml

    npm ci is widely used on CI server - for his continues integration purpose - so it can break a lot of things. From this point of view it's critical. It must be fixed before latest npm will be promoted into node.js.

    P.S. I saw this patch version also changed presence of many peer items in lock file. I hope it's final state. One change in peers was in 11.x - ok, it's major, but this one is second I hope last one :-). It can complicate merges from individual devs with only npm patched version difference.

  16. PyvesB commented on Nov 26, 2025

    @PyvesB

    Thanks for the quick fix, @owlstronaut!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingNeeds Triageneeds review for next steps

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions