question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`vue create` fails when using custom setup with Unit testing and Jest

See original GitHub issue

Version

4.5.12

Environment info

Environment Info:

  System:
    OS: Windows 10 10.0.19042
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 15.14.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 7.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 90.0.4430.85
    Edge: Spartan (44.19041.906.0), Chromium (90.0.818.46)
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

vue create test
  1. (optional) Overwrite
  2. Select Manually select features
  3. Features: Enable Unit testing
  4. vue version: (default) 2.x
  5. Linter/formatter: (default) Eslint with error prevention only
  6. Lint features: (default)
  7. Unit testing framework: Jest
  8. Config placement: (default) In dedicated config files
  9. Save preset: (default) N

Workaround: Use mocha chai as unit testing framework.

What is expected?

Vue creates a project without errors, or shows an error message that these settings are unavailable.

What is actually happening?

Fails with error message (ignore the Warning: Ignoring extra certs warnings)

Warning: Ignoring extra certs from `C:\Users\sscho\AppData\Local\mkcert`, load failed: error:02001005:system library:fopen:Input/output error
Warning: Ignoring extra certs from `C:\Users\sscho\AppData\Local\mkcert`, load failed: error:02001005:system library:fopen:Input/output error
npm ERR! code 1
npm ERR! path C:\test\node_modules\deasync
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./build.js
npm ERR! `win32-x64-node-15` exists; testing
npm ERR! Problem with the binary; manual build incoming
npm ERR! stdout=
npm ERR! err=null
npm ERR! Warning: Ignoring extra certs from `C:\Users\sscho\AppData\Local\mkcert`, load failed: error:02001005:system library:fopen:Input/output error
npm ERR! Warning: Ignoring extra certs from `C:\Users\sscho\AppData\Local\mkcert`, load failed: error:02001005:system library:fopen:Input/output error
npm ERR! Warning: Ignoring extra certs from `C:\Users\sscho\AppData\Local\mkcert`, load failed: error:02001005:system library:fopen:Input/output error
npm ERR! gyp: Call to 'node -p "require('node-addon-api').include"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\sscho\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:369:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sscho\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\test\node_modules\deasync
npm ERR! gyp ERR! node -v v15.14.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! Build failed

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\sscho\AppData\Local\npm-cache\_logs\2021-04-27T06_49_55_509Z-debug.log
 ERROR  command failed: npm install --loglevel error --legacy-peer-deps

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

7reactions
lloydjatkinsoncommented, Oct 26, 2021

Apparently the fix is: https://github.com/vuejs/vue-jest/issues/403#issuecomment-951492051

But my question is why is Vue CLI installing not just old but deprecated versions? For context, this problem was encountered on a project setup literally days ago.

4reactions
LanFeusT23commented, May 19, 2021

Exactly the same error here on installing that deasync dependency.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unit Testing Vue Component - Jest Setup - Stack Overflow
I am new to Jest and am trying to run a simple unit test just to ensure everything is set up correctly and...
Read more >
5 mins to fix jest tests for app with: Unknown custom element
1. Are you missing packages? Check your node_modules package and install missing packages / components modules. Or reinstall your node_modules via `npm install ......
Read more >
Frontend testing standards and style guidelines - GitLab Docs
We use Jest to write frontend unit and integration tests. Jest tests can be found in /spec/frontend and /ee/spec/frontend in EE. Limitations of...
Read more >
Vue.js 3 Unit Testing Setup & Basics Tutorial - KoderHQ
Learn about Unit testing. We cover how to set up a testing environment and the basics of working with the Jest test runner....
Read more >
Vue+jest+Vuetify 2.0.*+unit testing : Getting an error as "[Vue ...
This error occurs because vuetify is not registered to your test project. To do so you have to create an index.js file in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found