You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vue create vue-test2
# and enable unit tests at prompt
cd vue-test2
npm i -S buefy
npm run test:unit
What is expected?
The unit tests run without error
What is actually happening?
An error:
➜ vue-test2 git:(master) ✗ npm run test:unit
> [email protected] test:unit /Users/tony/src/tmp/vue-test2
> vue-cli-service test:unit
No tests found
In /Users/tony/src/tmp/vue-test2
11 files checked.
testMatch: /Users/tony/src/tmp/vue-test2/(tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)) - 0 matches
testPathIgnorePatterns: /node_modules/ - 11 matches
Pattern: - 0 matches
ERROR jest exited with code 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:unit: `vue-cli-service test:unit`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/tony/.npm/_logs/2018-06-27T20_17_10_928Z-debug.log
The contents of /Users/tony/.npm/_logs/2018-06-27T20_17_10_928Z-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/Users/tony/n/bin/node',
1 verbose cli '/Users/tony/n/bin/npm',
1 verbose cli 'run',
1 verbose cli 'test:unit' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'pretest:unit', 'test:unit', 'posttest:unit' ]
5 info lifecycle [email protected]~pretest:unit: [email protected]
6 info lifecycle [email protected]~test:unit: [email protected]
7 verbose lifecycle [email protected]~test:unit: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~test:unit: PATH: /Users/tony/n/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/tony/src/tmp/vue-test2/node_modules/.bin:/Users/tony/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/tony/n/bin
9 verbose lifecycle [email protected]~test:unit: CWD: /Users/tony/src/tmp/vue-test2
10 silly lifecycle [email protected]~test:unit: Args: [ '-c', 'vue-cli-service test:unit' ]
11 silly lifecycle [email protected]~test:unit: Returned: code: 1 signal: null
12 info lifecycle [email protected]~test:unit: Failed to exec test:unit script
13 verbose stack Error: [email protected] test:unit: `vue-cli-service test:unit`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/Users/tony/n/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (/Users/tony/n/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:961:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/tony/src/tmp/vue-test2
16 verbose Darwin 17.6.0
17 verbose argv "/Users/tony/n/bin/node" "/Users/tony/n/bin/npm" "run" "test:unit"
18 verbose node v10.5.0
19 verbose npm v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] test:unit: `vue-cli-service test:unit`
22 error Exit status 1
23 error Failed at the [email protected] test:unit script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
A workaround is to delete and reinstall node_modules. Note that installing the project from scratch after a git clone does not reproduce the problem. The issue happens specifically after installing buefy after creating a Vue project from the cli.
Environment
node 10.5.0
npm 6.1.0
macOS High Sierra 10.13.5
MacBook Pro
Full command output
➜ tmp vue create vue-test2
Vue CLI v3.0.0-rc.3
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, Linter, Unit
? Pick a linter / formatter config: Basic
? Pick additional lint features: Lint on save
? Pick a unit testing solution: Jest
? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedica
ted config files
? Save this as a preset for future projects? No
Vue CLI v3.0.0-rc.3
✨ Creating project in /Users/tony/src/tmp/vue-test2.
🗃 Initializing git repository...
⚙ Installing CLI plugins. This might take a while...
yarn install v1.7.0
info No lockfile found.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/jest as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/jest
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/uglifyjs as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/uglify-js
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/regjsparser as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/regjsparser
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/nopt as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/nopt
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/jsesc as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/jsesc
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/esparse as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/esprima
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/esvalidate as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/esprima
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/browserslist as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/browserslist
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/babylon as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/babylon
[fsevents] Success: "/Users/tony/src/tmp/vue-test2/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
[email protected]
added 234 packages from 56 contributors, removed 89 packages, updated 1245 packages and audited 72619 packages in 47.473s
found 0 vulnerabilities
No tests found
In /Users/tony/src/tmp/vue-test2
11 files checked.
testMatch: /Users/tony/src/tmp/vue-test2/(tests/unit//*.spec.(js|jsx|ts|tsx)|/tests/*.(js|jsx|ts|tsx)) - 0 matches
testPathIgnorePatterns: /node_modules/ - 11 matches
Pattern: - 0 matches
ERROR jest exited with code 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:unit: vue-cli-service test:unit
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/tony/.npm/_logs/2018-06-27T20_17_10_928Z-debug.log
The text was updated successfully, but these errors were encountered:
Version
3.0.0-rc.3
Reproduction link
https://github.com/tony19/vue-cli-broken-tests-demo.git
Steps to reproduce
Run the following commands:
What is expected?
The unit tests run without error
What is actually happening?
An error:
The contents of
/Users/tony/.npm/_logs/2018-06-27T20_17_10_928Z-debug.log
:A workaround is to delete and reinstall
node_modules
. Note that installing the project from scratch after a git clone does not reproduce the problem. The issue happens specifically after installing buefy after creating a Vue project from the cli.Environment
Full command output
added 234 packages from 56 contributors, removed 89 packages, updated 1245 packages and audited 72619 packages in 47.473s
found 0 vulnerabilities
➜ vue-test2 git:(master) ✗ npm run test:unit
No tests found
In /Users/tony/src/tmp/vue-test2
11 files checked.
testMatch: /Users/tony/src/tmp/vue-test2/(tests/unit//*.spec.(js|jsx|ts|tsx)|/tests/*.(js|jsx|ts|tsx)) - 0 matches
testPathIgnorePatterns: /node_modules/ - 11 matches
Pattern: - 0 matches
ERROR jest exited with code 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:unit:
vue-cli-service test:unit
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/tony/.npm/_logs/2018-06-27T20_17_10_928Z-debug.log
The text was updated successfully, but these errors were encountered: