Skip to content

[BUG] sh: 1: xdg-open: not found #5903

@bnb

Description

@bnb

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

Running npm publish fails because xdg-open is not installed.

❯ npm publish
npm notice 
npm notice 📦  bitandbang@3.0.1
npm notice === Tarball Contents === 
npm notice 1.1kB LICENSE     
npm notice 293B  README.md   
npm notice 233B  bin/card.js 
npm notice 1.8kB bin/output  
npm notice 914B  package.json
npm notice === Tarball Details === 
npm notice name:          bitandbang                              
npm notice version:       3.0.1                                   
npm notice filename:      bitandbang-3.0.1.tgz                    
npm notice package size:  1.8 kB                                  
npm notice unpacked size: 4.3 kB                                  
npm notice shasum:        e41e2f220aab4bac285b1c92b77529028be79442
npm notice integrity:     sha512-uopvx5yoKCJmR[...]v/TqtK3drTsSA==
npm notice total files:   5                                       
npm notice 
npm notice Publishing to https://registry.npmjs.org/ with tag latest and default access
Authenticate your account at:
https://www.npmjs.com/auth/cli/7bc3930c-17c0-4537-8ec1-d8f724859741
Press ENTER to open in the browser...
npm ERR! code 127
npm ERR! command failed
npm ERR! command sh -c xdg-open https://www.npmjs.com/auth/cli/npm_***
npm ERR! sh: 1: xdg-open: not found

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/bnb/.npm/_logs/2022-11-29T06_42_23_988Z-debug-0.log

Expected Behavior

Running npm publish works

Steps To Reproduce

  1. Use WSL2 with Ubuntu
  2. Use fnm to install Node.js
  3. Update npm with npm i -g npm
  4. Try to publish a module

Environment

  • npm: 9.1.2
  • Node.js: 19.1.0
  • OS Name: Windows / WSL2 (Ubuntu)
  • npm config:
; "user" config from /home/bnb/.npmrc

//registry.npmjs.org/:_authToken = (protected) 

; "project" config from /home/bnb/GitHub/bnb/bitandbang/.npmrc

package-lock = false 

; "cli" config from command line options

location = "project" 

; node bin location = /home/bnb/.local/share/fnm/node-versions/v19.1.0/installation/bin/node
; node version = v19.1.0
; npm local prefix = /home/bnb/GitHub/bnb/bitandbang
; npm version = 9.1.2
; cwd = /home/bnb/GitHub/bnb/bitandbang
; HOME = /home/bnb
; Run `npm config ls -l` to show all defaults.

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 0will get attention right awayRelease 9.xwork is associated with a specific npm 9 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions