{"by_status":{"unconfirmed":[{"id":"cafc444a-b00b-40d4-a0e9-6dadce880cb1","slug":"npm-node-env-is-not-recognized-as-0b4a","url":"https://api.modalhub.ai/r/npm-node-env-is-not-recognized-as-0b4a","symptom":"'NODE_ENV' is not recognized as an internal or external command, operable program or batch file.","cause":"npm runs package.json scripts through cmd.exe on Windows (script-shell default), and cmd has no VAR=value command prefix, so it treats NODE_ENV=production as a program name","tool":"npm","version":"11.6.0","status":"unconfirmed","risk":{"level":"caution","flags":[{"code":"installs_package","args":["npm:cross-env"]}],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"140579a2-be61-454a-8460-053804025c7a","slug":"npm-npm-error-eresolve-unable-to-resolve-581d","url":"https://api.modalhub.ai/r/npm-npm-error-eresolve-unable-to-resolve-581d","symptom":"npm error ERESOLVE unable to resolve dependency tree","cause":"npm 7+ installs peerDependencies and aborts when a package's declared peer range (e.g. react ^18) excludes the version the root project uses (react 19)","tool":"npm","version":"10.9.2","status":"unconfirmed","risk":{"level":"caution","flags":[{"code":"installs_package","args":["unparsed"]},{"code":"unverified_package","args":["unparsed"]}],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"be978e70-4655-43a3-991a-2ab1679c2aee","slug":"npm-npm-error-error-eacces-permission-denied-bd37","url":"https://api.modalhub.ai/r/npm-npm-error-error-eacces-permission-denied-bd37","symptom":"npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/<pkg>'","cause":"the global prefix is a root-owned system directory (/usr/local or /usr from the official installer or a distro package), so npm running as your user cannot write there","tool":"npm","version":"10.9.2","status":"unconfirmed","risk":{"level":"caution","flags":[{"code":"system_config","args":["npm-config","shell-rc"]}],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"1e6fc244-5072-43c9-8f87-a5694a3ea754","slug":"npm-npm-error-npm-ci-can-only-0bec","url":"https://api.modalhub.ai/r/npm-npm-error-npm-ci-can-only-0bec","symptom":"npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.","cause":"npm ci never edits the lock: it rebuilds the tree from package.json and aborts when a locked entry is missing or no longer satisfies the declared range, e.g. a dependency edited without re-locking","tool":"npm","version":"10.9.2","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}}]},"count":4,"dead_ends":[{"attempt":"\"build\": \"set NODE_ENV=production && webpack\"","why":"cmd keeps the space before && in the value (NODE_ENV is \"production \"), and the script breaks on macOS, Linux and CI shells","reports":1,"record_url":"https://api.modalhub.ai/r/npm-node-env-is-not-recognized-as-0b4a"},{"attempt":"point npm's script-shell at Git Bash's bash.exe","why":"works only on machines where that shell exists at that path; other Windows machines and fresh CI runners still use cmd.exe","reports":1,"record_url":"https://api.modalhub.ai/r/npm-node-env-is-not-recognized-as-0b4a"},{"attempt":"npm install --force","why":"npm's own report calls this accepting \"an incorrect (and potentially broken) dependency resolution\"; the lockfile then records that tree for everyone","reports":1,"record_url":"https://api.modalhub.ai/r/npm-npm-error-eresolve-unable-to-resolve-581d"},{"attempt":"npm install --legacy-peer-deps (or legacy-peer-deps=true in .npmrc)","why":"ignores every peerDependencies range in the tree (npm 3-6 behaviour), so <pkg> runs on a peer major it never declared and other peer conflicts are hidden too","reports":1,"record_url":"https://api.modalhub.ai/r/npm-npm-error-eresolve-unable-to-resolve-581d"},{"attempt":"sudo chmod -R 777 /usr/local, or chown it to your user","why":"makes a system directory writable by any process (777: any user), so anything can replace binaries other software runs from there","reports":1,"record_url":"https://api.modalhub.ai/r/npm-npm-error-error-eacces-permission-denied-bd37"},{"attempt":"sudo npm install -g <pkg>","why":"works once but leaves the prefix root-owned, so every later global install or update needs sudo too","reports":1,"record_url":"https://api.modalhub.ai/r/npm-npm-error-error-eacces-permission-denied-bd37"},{"attempt":"delete package-lock.json and regenerate it","why":"re-resolves every transitive dependency to the newest in-range version, a large unreviewed upgrade instead of a one-line sync","reports":1,"record_url":"https://api.modalhub.ai/r/npm-npm-error-npm-ci-can-only-0bec"},{"attempt":"replace npm ci with npm install in CI","why":"npm install rewrites the lock inside CI, so the drifted entries resolve afresh on every run and the fix is never committed; builds stop being reproducible","reports":1,"record_url":"https://api.modalhub.ai/r/npm-npm-error-npm-ci-can-only-0bec"}],"tool":{"slug":"npm","name":"npm","records":4,"url":"https://api.modalhub.ai/t/npm"}}
