继上一个问题之后,安装依赖最后阶段报了一个新的错误,这回是真难住了
npm ERR! code 1
npm ERR! path E:\Project\cj-page\node_modules\@popperjs\core
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c husky install .config/husky
npm ERR! 'husky' �����ڲ����ⲿ���Ҳ���ǿ����еij���
npm ERR! �����������
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\CJWukuang\AppData\Local\npm-cache\_logs\2022-03-14T07_08_23_635Z-debug-0.log
2682 timing build:link:node_modules/js-export-excel/node_modules/codepage Completed in 104ms
2683 timing build:link:node_modules/prettier Completed in 105ms
2684 timing build:link:node_modules/xlsx Completed in 104ms
2685 timing build:link Completed in 109ms
2686 timing build:run:install Completed in 0ms
2687 info run @popperjs/core@2.11.3 postinstall node_modules/@popperjs/core husky install .config/husky
2688 info run core-js@3.21.1 postinstall node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"
2689 info run core-js-pure@3.21.1 postinstall node_modules/core-js-pure node -e "try{require('./postinstall')}catch(e){}"
2690 info run esbuild@0.14.26 postinstall node_modules/esbuild node install.js
2691 info run vue-demi@0.12.1 postinstall node_modules/@vueuse/core/node_modules/vue-demi node ./scripts/postinstall.js
2692 info run @popperjs/core@2.11.3 postinstall { code: 1, signal: null }
2693 info run vue-demi@0.12.1 postinstall { code: 0, signal: null }
2694 timing build:run:postinstall:node_modules/@vueuse/core/node_modules/vue-demi Completed in 404ms
2695 info run core-js-pure@3.21.1 postinstall { code: 0, signal: null }
2696 timing build:run:postinstall:node_modules/core-js-pure Completed in 415ms
2697 info run core-js@3.21.1 postinstall { code: 0, signal: null }
2698 timing build:run:postinstall:node_modules/core-js Completed in 420ms
2699 info run esbuild@0.14.26 postinstall { code: 0, signal: null }
2700 timing build:run:postinstall:node_modules/esbuild Completed in 436ms
2701 timing reify:rollback:createSparse Completed in 8221ms
2702 timing reify:rollback:retireShallow Completed in 0ms
2703 timing command:i Completed in 138964ms
2704 verbose stack Error: command failed
2704 verbose stack at ChildProcess.<anonymous> (C:\Users\CJWukuang\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
2704 verbose stack at ChildProcess.emit (events.js:400:28)
2704 verbose stack at maybeClose (internal/child_process.js:1055:16)
2704 verbose stack at Socket.<anonymous> (internal/child_process.js:441:11)
2704 verbose stack at Socket.emit (events.js:400:28)
2704 verbose stack at Pipe.<anonymous> (net.js:675:12)
2705 verbose pkgid @popperjs/core@2.11.3
2706 verbose cwd E:\Project\cj-page
2707 verbose Windows_NT 10.0.22000
2708 verbose argv "E:\\Dev\\nodejs\\node.exe" "C:\\Users\\CJWukuang\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i" "--save" "--registry" "http://192.xxx.xxx.xxx:xxxx/"
2709 verbose node v14.17.4
2710 verbose npm v8.5.4
2711 error code 1
2712 error path E:\Project\cj-page\node_modules\@popperjs\core
2713 error command failed
2714 error command C:\WINDOWS\system32\cmd.exe /d /s /c husky install .config/husky
2715 error 'husky' ڲ ⲿ Ҳ ǿ еij
2715 error ļ
2716 verbose exit 1
2717 timing npm Completed in 139260ms
2718 verbose unfinished npm timer reify 1647237974761
2719 verbose unfinished npm timer reify:build 1647238105354
2720 verbose unfinished npm timer build 1647238105355
2721 verbose unfinished npm timer build:deps 1647238105355
2722 verbose unfinished npm timer build:run:postinstall 1647238105475
2723 verbose unfinished npm timer build:run:postinstall:node_modules/@popperjs/core 1647238105475
2724 verbose code 1
2725 error A complete log of this run can be found in:
2725 error C:\Users\CJWukuang\AppData\Local\npm-cache\_logs\2022-03-14T06_06_14_501Z-debug-0.log
cnpm i 装
yarn i 装
都尝试一下
解决了,是 poperjs 这个插件的版本问题,之前版本里面有关 husky 的有问题。最新版的就没这个问题了
npm install --save-dev @commitlint/{config-conventional,cli}
npm install --save-dev husky