Should be able to install package using npm
npm install --save-dev @commitlint/config-conventional @commitlint/cli
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @commitlint/ensure@^7.0.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of '@commitlint/rules'
npm ERR! notarget
...
Run:
npm install --save-dev @commitlint/config-conventional @commitlint/cli
| Executable | Version |
| ---: | :--- |
| commitlint --version | n/a|
| git --version | 2.6.1.windows.1 |
| node --version | v10.5.0|
I'm also getting this...
+1
with commitlint version 7.1.1 I get:
npm ERR! notarget No matching version found for @commitlint/ensure@^7.1.1
Weird - will investigate later today
So, can't reproduce on the first few tries...
Could you post the result of npm show @commitlint/ensure ?
npm show @commitlint/ensure
Returns:
{ name: '@commitlint/ensure',
description: 'Lint your commit messages',
'dist-tags': { latest: '6.1.3' },
versions:
[ '5.2.8',
'6.0.0',
'6.0.2',
'6.0.3',
'6.0.4',
'6.1.0',
'6.1.1',
'6.1.2',
'6.1.3' ],
maintainers: [ 'marionebl <[email protected]>' ],
author: 'Mario Nebl <[email protected]>',
time:
{ '6.0.4': '2018-01-31T19:47:53.593Z',
'6.1.3': '2018-03-02T14:54:22.179Z',
'6.0.2': '2018-01-12T08:47:35.087Z',
'6.1.1': '2018-02-22T21:14:34.731Z',
'5.2.8': '2017-12-26T19:00:20.220Z',
'6.0.3': '2018-01-31T18:11:33.083Z',
'6.1.2': '2018-02-22T21:21:38.652Z',
'6.0.0': '2018-01-09T18:29:30.264Z',
'6.1.0': '2018-02-03T11:52:50.274Z',
created: '2017-12-26T19:00:20.220Z',
modified: '2018-03-02T14:54:22.642Z' },
repository:
{ type: 'git',
url: 'https://github.com/marionebl/commitlint.git' },
users: {},
readmeFilename: '',
homepage: 'https://github.com/marionebl/commitlint#readme',
keywords:
[ 'conventional-changelog', 'commitlint', 'library', 'core' ],
bugs: { url: 'https://github.com/marionebl/commitlint/issues' },
license: 'MIT',
version: '6.1.3',
engines: { node: '>=4' },
main: 'lib/index.js',
dist:
{ tarball:
'https://artifactory/@commitlint/ensure/-/ensure-6.1.3.tgz',
shasum: '813b58c9fdfae15351b72fe646a162ebdb71ea2a' },
dependencies:
{ 'lodash.camelcase': '4.3.0',
'lodash.kebabcase': '4.1.1',
'lodash.snakecase': '4.1.1',
'lodash.startcase': '4.4.0',
'lodash.upperfirst': '4.3.1' },
devDependencies:
{ '@commitlint/test': '^6.1.3',
'@commitlint/utils': '^6.1.3',
ava: '0.22.0',
'babel-cli': '6.26.0',
'babel-preset-commitlint': '^6.1.3',
'babel-register': '6.26.0',
concurrently: '3.5.1',
'cross-env': '5.1.1',
globby: '8.0.1',
'lodash.values': '4.3.0',
rimraf: '2.6.1',
xo: '0.20.3' },
files: [ 'lib/' ],
directories: {},
scripts:
{ build:
'cross-env NODE_ENV=production babel src --out-dir lib --source-maps',
clean: 'npx rimraf lib',
deps: 'dep-check',
pkg: 'pkg-check --skip-import',
lint: 'xo',
start: 'concurrently "ava -c 4 --verbose --watch" "yarn run watch"',
test: 'ava -c 4 --verbose',
watch: 'babel src --out-dir lib --watch --source-maps' },
xo: false,
babel: { presets: [ 'babel-preset-commitlint' ] },
ava:
{ files: [ 'src/**/*.test.js', '!lib/**/*' ],
source: [ 'src/**/*.js', '!lib/**/*' ],
babel: 'inherit',
require: [ 'babel-register' ] } }
There def. is something fishy going on, for me it is
位 npm show @commitlint/ensure .versions
[ '5.2.8',
'6.0.0',
'6.0.2',
'6.0.3',
'6.0.4',
'6.1.0',
'6.1.1',
'6.1.2',
'6.1.3',
'7.0.0',
'7.1.0',
'7.1.1' ]
Any chance you use an npm proxy like Nexus?
Good point! We use artifactory.
npm outdated currently gives me this:
@commitlint/cli 7.0.0 7.0.0 7.1.1 scip-backoffice-frontend
@commitlint/config-conventional 7.0.1 7.0.1 7.1.1 scip-backoffice-frontend
npm show @commitlint/ensure gives:
@commitlint/[email protected] | MIT | deps: 5 | versions: 10
Lint your commit messages
https://github.com/marionebl/commitlint#readme
keywords: conventional-changelog, commitlint, library, core
dist
.tarball https://artifactory.[COMPANY].net:443/api/npm/npm/@commitlint/ensure/-/ensure-7.0.0.tgz
.shasum: 3d5210bb988416844926895a782a55815731779d
dependencies:
lodash.camelcase: 4.3.0 lodash.kebabcase: 4.1.1 lodash.snakecase: 4.1.1 lodash.startcase: 4.4.0 lodash.upperfirst: 4.3.1
maintainers:
- marionebl <[email protected]>
dist-tags:
latest: 7.0.0
published 2 months ago by marionebl <[email protected]>
Ok, this is weird. I'll check details tomorrow and get back to you.
Hmm well I suspect something fishy is going on with artifactory (we use it too), but it was only this package though and we've never had any issues before. I'll take another look at our setup tomorrow but it seems to be working just fine now when I'm using my computer at home so the error is most likely due to artifcatory...
Apparently we and others had issues before with scoped packages. We already took care of that like mentioned here.
I can install versin 7.0.0 without issues, but not 7.1.0 nor 7.1.1. Without going through Artifactory it works. Damn.
We'll update Artifactory to the latest version later and see if that helps.
I don't think it's a commitlint issue. But let's keep the updated for others having the same issue.
Resolution
Please use following steps to work around this issue (requires Artifactory version 5.5.2 and above)
- in the npm-remote repository, in the Advanced Tab, enable the "Bypass HEAD Requests" so we wont send "https://registry.npmjs.org/" HEAD requests.
- Once you enable it, From the UI -> click on Artifacts, right click on the npm-repository name -> Zap cache.
Then we will be able to resolve the packages that returns 404 for HEAD requests.
This seems to solve it: Why am I getting 404 for some npm packages?
Thanks @escapedcat for putting the solution here. Closing for now.