Vue-cli: vue add unit-jest failed

Created on 15 Jul 2019  路  9Comments  路  Source: vuejs/vue-cli

Version

3.8.1

Reproduction link

https://registry.npmjs.org/vue-cli-plugin-unit-jest

Environment info

Environment Info:

  System:
    OS: macOS 10.14.5
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  Binaries:
    Node: 10.15.3 - /usr/local/opt/node@10/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/opt/node@10/bin/npm
  Browsers:
    Chrome: 75.0.3770.100
    Firefox: Not Found
    Safari: 12.1.1
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0 
    @vue/babel-preset-app:  3.8.0 
    @vue/babel-preset-jsx:  1.0.0 
    @vue/babel-sugar-functional-vue:  1.0.0 
    @vue/babel-sugar-inject-h:  1.0.0 
    @vue/babel-sugar-v-model:  1.0.0 
    @vue/babel-sugar-v-on:  1.0.0 
    @vue/cli-overlay:  3.8.0 
    @vue/cli-plugin-babel: ^3.5.0 => 3.8.0 
    @vue/cli-plugin-eslint: ^3.5.0 => 3.8.0 
    @vue/cli-service: ^3.5.0 => 3.8.4 
    @vue/cli-shared-utils:  3.8.0 
    @vue/component-compiler-utils:  2.6.0 
    @vue/eslint-config-airbnb: ^4.0.0 => 4.0.0 
    @vue/preload-webpack-plugin:  1.1.0 
    @vue/test-utils: ^1.0.0-beta.29 => 1.0.0-beta.29 
    @vue/web-component-wrapper:  1.2.0 
    babel-helper-vue-jsx-merge-props:  2.0.3 
    eslint-plugin-vue: ^5.0.0 => 5.2.3 (4.7.1)
    typescript: ^3.5.2 => 3.5.2 
    vue: 2.6.6 => 2.6.6 
    vue-clipboard2: ^0.3.0 => 0.3.0 
    vue-eslint-parser:  5.0.0 (2.0.3)
    vue-hot-reload-api:  2.3.3 
    vue-image-crop-upload: ^2.5.0 => 2.5.0 
    vue-loader:  15.7.0 
    vue-router: ^3.0.1 => 3.0.6 
    vue-style-loader:  4.1.2 
    vue-template-compiler: 2.6.6 => 2.6.6 
    vue-template-es2015-compiler:  1.9.1 
    vuedraggable: ^2.23.0 => 2.23.0 
    vuex: ^3.0.1 => 3.1.1 
  npmGlobalPackages:
    @vue/cli: 3.8.2


Steps to reproduce

run command: vue add unit-jest

What is expected?

unit-jest dependencies can successfully added

What is actually happening?

error An unexpected error occurred: "https://registry.npmjs.org/vue-cli-plugin-unit-jest: Not found".


seems like vue-cli-plugin-unit-jest has already moved to @vue/cli-plugin-unit-jest. If my assume is correct please update the correct registry to add script

3.x next

Most helpful comment

Actually in the v3 documentation, the command is:
vue add @vue/unit-jest

All 9 comments

It's fixed in v4 alpha but not yet backported to v3. I'll do it asap.

Actually in the v3 documentation, the command is:
vue add @vue/unit-jest

Fixed in v3.11.0

yes.

@sodatea I found this issue after having trouble installing with the vue add unit-jest direction found in the CLI Plugin documentation. Though thankfully, your July 15 comment helped me out.

This is still an issue. I'm getting the following error

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@vue%2fcli-plugin-unit-test - Not found
npm ERR! 404
npm ERR! 404 '@vue/cli-plugin-unit-test@~4.5.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2020-10-09T21_09_01_315Z-debug.log
ERROR command failed: npm install --loglevel error @vue/cli-plugin-unit-test@~4.5.0 -D

Below is the log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\node\bin\node.exe',
1 verbose cli 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli '@vue/cli-plugin-unit-test@~4.5.0',
1 verbose cli '-D'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 08b7a74a6f9d2a34
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 404 https://registry.npmjs.org/@vue%2fcli-plugin-unit-test 133ms
8 http fetch GET 404 https://registry.npmjs.org/@vue%2fcli-plugin-unit-test 24ms
9 silly fetchPackageMetaData error for @vue/cli-plugin-unit-test@~4.5.0 404 Not Found - GET https://registry.npmjs.org/@vue%2fcli-plugin-unit-test - Not found
10 timing stage:rollbackFailedOptional Completed in 1ms
11 timing stage:runTopLevelLifecycles Completed in 2338ms
12 verbose stack Error: 404 Not Found - GET https://registry.npmjs.org/@vue%2fcli-plugin-unit-test - Not found
12 verbose stack at C:\Users\Administrator\AppData\Roaming\npmnode_modules\npmnode_modules\npm-registry-fetch\check-response.js:117:15
12 verbose stack at processTicksAndRejections (internal/process/task_queues.js:93:5)
13 verbose statusCode 404
14 verbose pkgid @vue/cli-plugin-unit-test@~4.5.0
15 verbose cwd E:_\Card Issuance System\Current\DEV\Web\CardManagementSystem(Commerce).VueTS
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\Users\Administrator\AppData\Roaming\npm\node_modules\node\bin\node.exe" "C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "--loglevel" "error" "@vue/cli-plugin-unit-test@~4.5.0" "-D"
18 verbose node v14.8.0
19 verbose npm v6.14.8
20 error code E404
21 error 404 Not Found - GET https://registry.npmjs.org/@vue%2fcli-plugin-unit-test - Not found
22 error 404
23 error 404 '@vue/cli-plugin-unit-test@~4.5.0' is not in the npm registry.
24 error 404 You should bug the author to publish it (or use the name yourself!)
25 error 404 Note that you can also install from a
26 error 404 tarball, folder, http url, or git url.
27 verbose exit [ 1, true ]

@rashadrivera there's a typo in your command. It's unit-jest not unit-test.

Was this page helpful?
0 / 5 - 0 ratings