Здравствуйте, как исправить ошибку при создании проекта Vue 3 Jest?

#vue.js #jestjs

Вопрос:

как исправить ошибку при создании проекта Vue 3 Jest? Я использовал npm i-g @vue/cli и vue create . Бревна:

 /*
Microsoft Windows [Version 10.0.17763.1217]
(c) 2018 Microsoft Corporation. All rights reserved.

D:ProjectsFrontEndfcrp>vue create .


Vue CLI v4.5.13
? Generate project in current directory? Yes


Vue CLI v4.5.13
? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex, CSS Pre-processors, Linter, Unit, E2E
? Choose a version of Vue.js that you want to start the project with 3.x
? Use history mode for router? (Requires proper server setup for index fallback in production) No
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS (with dart-sass)
? Pick a linter / formatter config: Prettier
? Pick additional lint features: Lint on save
? Pick a unit testing solution: Jest
? Pick an E2E testing solution: WebdriverIO
? Pick browsers to run end-to-end test on Chrome, Firefox
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No


Vue CLI v4.5.13
✨  Creating project in D:ProjectsFrontEndfcrp.
⚙️  Installing CLI plugins. This might take a while...

npm ERR! code 1
npm ERR! path D:ProjectsFrontEndfcrpnode_modulesfibers
npm ERR! command failed
npm ERR! command C:Windowssystem32cmd.exe /d /s /c node-gyp rebuild
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR!   fibers.cc
npm ERR! C:UsersVectorAppDataLocalnode-gypCache16.2.0includenodenode.h(63,10): fatal error C1083: Cannot open include file: 'v8.h': No such file or directory [D:ProjectsFrontEndfcrpnode_modulesfibersbuildfibers.vcxproj]
npm ERR! (node:1448) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:Program Files (x86)Microsoft Visual Studio2019EnterpriseMSBuildCurrentBinMSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibbuild.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
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.17763
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:ProjectsFrontEndfcrpnode_modulesfibers
npm ERR! gyp ERR! node -v v16.2.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersVectorAppDataLocalnpm-cache_logs2021-06-01T00_11_29_219Z-debug.log
 ERROR  command failed: npm install --loglevel error --legacy-peer-deps

D:ProjectsFrontEndfcrp>
*/ 

Установлен узел и установлены дополнительные файлы, но проблема не решена, что происходит не так

 npm install --global --production windows-build-tools    
npm install --global node-gyp
 

Это не помогло решить проблему
Мокко Чай отлично работает без ошибок, но шутка приводит к ошибкам
WebdriverIO (на основе WebDriver/DevTools) также выдает ошибку, но Cypress (только для Chrome) работает нормально

Комментарии:

1. Я думаю, что это проблема с вашей установкой vs. Установите python 2.7, посмотрите, строится ли он с этим вместо этого