[BUG] No Error Details About Dependency Parents
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
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
Getting an error when trying to run npm i.
Normally this would be fine and would be possible to debug, but I have NO idea where this dependency is getting installed from.
I'm 99% sure this is due to an outdated dependency. But due to the fact that Electron is not a direct dependency of my project, I have NO idea how to track down which of my direct dependencies is causing this.
npm ERR! code 1
npm ERR! path /Users/charliefish/Developer/Code/node_modules/electron
npm ERR! command failed
npm ERR! command sh -c node install.js
Downloading electron-v2.0.18-darwin-arm64.zip
npm ERR! Error: GET https://github.com/electron/electron/releases/download/v2.0.18/electron-v2.0.18-darwin-arm64.zip returned 404
npm ERR! /Users/charliefish/Developer/Code/node_modules/electron/install.js:54
npm ERR! throw err
npm ERR! ^
npm ERR!
npm ERR! Error: Failed to find Electron v2.0.18 for darwin-arm64 at https://github.com/electron/electron/releases/download/v2.0.18/electron-v2.0.18-darwin-arm64.zip
npm ERR! at Request.<anonymous> (/Users/charliefish/Developer/Code/node_modules/nugget/index.js:169:61)
npm ERR! at Request.emit (node:events:390:28)
npm ERR! at Request.onRequestResponse (/Users/charliefish/Developer/Code/node_modules/request/request.js:1066:10)
npm ERR! at ClientRequest.emit (node:events:390:28)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:623:27)
npm ERR! at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
npm ERR! at TLSSocket.socketOnData (node:_http_client:487:22)
npm ERR! at TLSSocket.emit (node:events:390:28)
npm ERR! at addChunk (node:internal/streams/readable:315:12)
npm ERR! at readableAddChunk (node:internal/streams/readable:289:9)
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/charliefish/.npm/_logs/2022-01-23T01_46_07_453Z-debug.log
Expected Behavior
When an error occurs, it should show you the complete tree of the dependencies so you can track down what direct dependency is requiring electron.
Right now it's IMPOSSIBLE to figure out which of my dependencies is installing Electron. Which makes this issue impossible to debug.
Steps To Reproduce
- Run
npm iwith a failure on a dependency of one of your dependencies
Environment
- npm: 8.1.2
- Node.js: v16.13.2
- OS Name: macOS
- System Model Name:
- npm config:
; "user" config from /Users/charliefish/.npmrc
//npm.pkg.github.com/:_authToken = (protected)
//registry.npmjs.com/:_authToken = (protected)
registry = "https://npm.network.charlie.fish/"
; node bin location = /Users/charliefish/.nvm/versions/node/v16.13.2/bin/node
; cwd = /Users/charliefish
; HOME = /Users/charliefish
; Run `npm config ls -l` to show all defaults.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with npm i when a dependency's install script fails, using the reported Electron error as a reference. Trace how npm reports dependency installation errors and determine where the parent dependency chain can be surfaced. Done means the error output identifies the direct and transitive parents of the failing dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100