Closed
Description
Current Behavior:
npm publish path/to/pkg
command in monorepository executed for package without repository
field trying to do git ls-remote on ssh://[email protected]/path/to/pkg.git
and fails.
Some in --dry-run
mode
Expected Behavior:
The success of the 'npm publish' command does not depend on the presence of a package in any DVCS. At least some ENV variable to disable communication with DVCS would be nice.
Steps To Reproduce:
- Create a "src/test-pkg" directory for example
- Write
package.json
with dead simple config{ "name": "test-pkg", "version": "0.0.1" }
- Run
npm publish --dry-run src/test-pkg
ornpm publish src/test-pkg
- See error:
npm ERR! code 128
npm ERR! command failed
npm ERR! command git ls-remote ssh://[email protected]/src/test-pkg.git
npm ERR! ERROR: Repository not found.
Environment:
OS: mac os 10.15.7
npm version is
{
npm: '7.5.3',
node: '15.8.0',
v8: '8.6.395.17-node.23',
uv: '1.40.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.17.1',
modules: '88',
nghttp2: '1.42.0',
napi: '7',
llhttp: '2.1.3',
openssl: '1.1.1i',
cldr: '38.1',
icu: '68.2',
tz: '2020d',
unicode: '13.0'
}