Prerequisites
Reproduction url
https://stackblitz.com/github/webpro-nl/knip/tree/main/templates/issue-reproduction/basic
Reproduction access
Description of the issue
I wanted to reproduce another bug, but when I follow either of the Stackblitz links from https://knip.dev/guides/issue-reproduction#templates and run npx knip in the terminal, I get this error:
Error: Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
at Object.eval (/home/projects/aoniqgqqkq.github/node_modules/oxc-resolver/index.js:570:11)
at Object._0xf5cb4c (https://aoniqgqqkqgithub-2ozt-8vij1i0f.w-credentialless-staticblitz.com/blitz.1db57326.js:31:866229)
at Module._compile (node:internal/modules/cjs/loader:148:16006)
at Module._extensions..js (node:internal/modules/cjs/loader:148:16726)
at Module.load (node:internal/modules/cjs/loader:148:15281)
at Module._load (node:internal/modules/cjs/loader:148:12773)
at G.set.n (node:internal/modules/esm/translators:163:4437)
at _0x3aa65c.evaluationFunction (node:internal/modules/esm/translators:163:3218)
at _0x3aa65c.evaluate (https://aoniqgqqkqgithub-2ozt-8vij1i0f.w-credentialless-staticblitz.com/blitz.1db57326.js:31:832001)
at _0x59aa5d._evaluate (https://aoniqgqqkqgithub-2ozt-8vij1i0f.w-credentialless-staticblitz.com/blitz.1db57326.js:31:839316)
Node.js v20.19.1
I see the same error after removing package-lock.json and node_modules and re-running npm install as the error message advises.
I'm running Stackblitz in Chrome 141 on macOS.
Prerequisites
Reproduction url
https://stackblitz.com/github/webpro-nl/knip/tree/main/templates/issue-reproduction/basic
Reproduction access
Description of the issue
I wanted to reproduce another bug, but when I follow either of the Stackblitz links from https://knip.dev/guides/issue-reproduction#templates and run
npx knipin the terminal, I get this error:I see the same error after removing
package-lock.jsonandnode_modulesand re-runningnpm installas the error message advises.I'm running Stackblitz in Chrome 141 on macOS.