Primero instalé npm y vue desde el sitio oficial y npm funcionó bien al instalar otros paquetes como cli-service y cli-eslint. pero cli-plugin-unit-jest simplemente falló.
utilizo el siguiente comando:
npm install -g @vue/cli-plugin-unit-jest@^4.4.6pero obtuve el siguiente error:
npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup undefined, npm WARN cleanup AssertionError [ERR_ASSERTION]: rimraf: missing path npm WARN cleanup at rimraf (D:\Software\NodeJs\node_global\node_modules\npm\node_modules\rimraf\rimraf.js:54:3) ... npm WARN cleanup generatedMessage: false, npm WARN cleanup code: 'ERR_ASSERTION', npm WARN cleanup actual: undefined, npm WARN cleanup expected: true, npm WARN cleanup operator: '==' npm WARN cleanup } npm WARN cleanup ] npm WARN cleanup ] npm ERR! code 1 npm ERR! path D:\Software\NodeJs\node_global\node_modules\@vue\cli-plugin-unit-jest\node_modules\canvas npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild npm ERR! �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�-m�����ء� npm ERR! Backend.cc npm ERR! D:\Software\NodeJs\node_global\node_modules\@vue\cli-plugin-unit-jest\node_modules\canvas\src\backend\Backend.h(3,10): fatal error C1083: �������ļ�: ��cairo.h��: No such file or directory [D:\Software\NodeJs\ node_global\node_modules\@vue\cli-plugin-unit-jest\node_modules\canvas\build\canvas.vcxproj] npm ERR! gyp info it worked if it ends with ok ... npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: `D:\Software\MSVS2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onExit (D:\Software\NodeJs\node_global\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:378: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 "D:\\Software\\NodeJs\\node.exe" "D:\\Software\\NodeJs\\node_global\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd D:\Software\NodeJs\node_global\node_modules\@vue\cli-plugin-unit-jest\node_modules\canvas npm ERR! gyp ERR! node -v v15.11.0 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok¿Cuál es el problema? ¿Hay alguna dependencia que no haya instalado?