网站首页 > 精选文章 / 正文
一:下载和安装
1,安装Cypress,首先需要安装nodejs,可以到nodejs的中文网http://nodejs.cn/进行下载安装node-v20.18.0-x64.msi
2使用工具yarn,windows在cmd窗口(报错1)安装npm install -g yarn,安装完成后,可以通过yarn -version命令检查是否已经安装成功
报错1 npm should be run outside of the Node.js REPL, in your normal shell
---本命令不能在node.js的默认打开窗口使用
报错日志:C:\Users\Administrator\AppData\Local\npm-cache\_logs
使用npm install cypress,报错
更换命令:npm install -g yarn
C:\Users\Administrator>npm install -g yarn
added 1 package in 4s
C:\Users\Administrator>yarn -version1.22.22
3,安装cypress,在d盘新建一个文件夹,切换至该文件夹下,然后安装到此文件夹中
D:\>cd d:\cypress
d:\cypress>yarn add cypress --dev
yarn add v1.22.22
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
success Saved lockfile.
success Saved 148 new dependencies.
info Direct dependencies
└─ cypress@13.15.1
info All dependencies
├─ @colors/colors@1.5.0
├─ @cypress/request@3.0.6
├─ @cypress/xvfb@1.2.4
├─ @types/node@22.9.0
├─ @types/sinonjs__fake-timers@8.1.1
├─ @types/sizzle@2.3.9
├─ @types/yauzl@2.10.3
├─ aggregate-error@3.1.0
├─ ansi-colors@4.1.3
├─ ansi-escapes@4.3.2
├─ ansi-regex@5.0.1
├─ arch@2.2.0
├─ asn1@0.2.6
├─ async@3.2.6
├─ asynckit@0.4.0
├─ at-least-node@1.0.0
├─ aws-sign2@0.7.0
├─ aws4@1.13.2
├─ base64-js@1.5.1
├─ bcrypt-pbkdf@1.0.2
├─ blob-util@2.0.2
├─ bluebird@3.7.2
├─ buffer-crc32@0.2.13
├─ buffer@5.7.1
├─ cachedir@2.4.0
├─ call-bind@1.0.7
├─ caseless@0.12.0
├─ check-more-types@2.24.0
├─ ci-info@3.9.0
├─ clean-stack@2.2.0
├─ cli-table3@0.6.5
├─ cli-truncate@2.1.0
├─ color-convert@2.0.1
├─ color-name@1.1.4
├─ colorette@2.0.20
├─ combined-stream@1.0.8
├─ commander@6.2.1
├─ common-tags@1.8.2
├─ core-util-is@1.0.2
├─ cross-spawn@7.0.3
├─ cypress@13.15.1
├─ dashdash@1.14.1
├─ dayjs@1.11.13
├─ debug@4.3.7
├─ define-data-property@1.1.4
├─ delayed-stream@1.0.0
├─ ecc-jsbn@0.1.2
├─ emoji-regex@8.0.0
├─ end-of-stream@1.4.4
├─ enquirer@2.4.1
├─ escape-string-regexp@1.0.5
├─ eventemitter2@6.4.7
├─ execa@4.1.0
├─ executable@4.1.1
├─ extend@3.0.2
├─ extract-zip@2.0.1
├─ extsprintf@1.3.0
├─ fd-slicer@1.1.0
├─ figures@3.2.0
├─ forever-agent@0.6.1
├─ form-data@4.0.1
├─ fs-extra@9.1.0
├─ get-intrinsic@1.2.4
├─ get-stream@5.2.0
├─ getos@3.2.1
├─ getpass@0.1.7
├─ global-dirs@3.0.1
├─ graceful-fs@4.2.11
├─ has-property-descriptors@1.0.2
├─ has-proto@1.0.3
├─ has-symbols@1.0.3
├─ hasown@2.0.2
├─ http-signature@1.4.0
├─ human-signals@1.1.1
├─ ieee754@1.2.1
├─ indent-string@4.0.0
├─ ini@2.0.0
├─ is-ci@3.0.1
├─ is-installed-globally@0.4.0
├─ is-path-inside@3.0.3
├─ is-stream@2.0.1
├─ is-typedarray@1.0.0
├─ is-unicode-supported@0.1.0
├─ isexe@2.0.0
├─ isstream@0.1.2
├─ json-schema@0.4.0
├─ json-stringify-safe@5.0.1
├─ jsonfile@6.1.0
├─ jsprim@2.0.2
├─ lazy-ass@1.6.0
├─ listr2@3.14.0
├─ lodash.once@4.1.1
├─ lodash@4.17.21
├─ log-symbols@4.1.0
├─ log-update@4.0.0
├─ merge-stream@2.0.0
├─ mime-db@1.52.0
├─ mime-types@2.1.35
├─ mimic-fn@2.1.0
├─ minimist@1.2.8
├─ ms@2.1.3
├─ npm-run-path@4.0.1
├─ object-inspect@1.13.2
├─ once@1.4.0
├─ ospath@1.2.2
├─ p-map@4.0.0
├─ path-key@3.1.1
├─ pend@1.2.0
├─ performance-now@2.1.0
├─ pify@2.3.0
├─ pretty-bytes@5.6.0
├─ process@0.11.10
├─ proxy-from-env@1.0.0
├─ pump@3.0.2
├─ qs@6.13.0
├─ request-progress@3.0.0
├─ restore-cursor@3.1.0
├─ rfdc@1.4.1
├─ rxjs@7.8.1
├─ safe-buffer@5.2.1
├─ safer-buffer@2.1.2
├─ semver@7.6.3
├─ set-function-length@1.2.2
├─ shebang-command@2.0.0
├─ shebang-regex@3.0.0
├─ side-channel@1.0.6
├─ slice-ansi@3.0.0
├─ sshpk@1.18.0
├─ strip-final-newline@2.0.0
├─ supports-color@8.1.1
├─ throttleit@1.0.1
├─ through@2.3.8
├─ tldts-core@6.1.58
├─ tldts@6.1.58
├─ tmp@0.2.3
├─ tough-cookie@5.0.0
├─ tree-kill@1.2.2
├─ tslib@2.8.1
├─ tunnel-agent@0.6.0
├─ tweetnacl@0.14.5
├─ type-fest@0.21.3
├─ undici-types@6.19.8
├─ untildify@4.0.0
├─ uuid@8.3.2
├─ verror@1.10.0
├─ which@2.0.2
├─ wrap-ansi@7.0.0
└─ wrappy@1.0.2
Done in 140.07s.
info There appears to be trouble with your network connection. Retrying...
Tags:npm 安装 yarn
猜你喜欢
- 2024-12-08 Avue - 更加贴合企业开发的数据驱动前端开发框架
- 2024-12-08 告别 Node.js 安装配置的繁琐!国内镜像源加速,版本切换轻松搞定
- 2024-12-08 安利一款基于canvas/svg的富文本编辑器-支持在线导出PDF、DOCX
- 2024-12-08 前端:从零开发一款可视化搭建框架
- 2024-12-08 yarn-看这一篇就够了
- 2024-12-08 不会前端编程也能做网页一款强大的低代码可视化 H5 搭建平台
- 2024-12-08 一款高效、强大、开源的后台管理模板
- 2024-12-08 效率提高十倍,Puppeteer 如何启动交互模式?
- 2024-12-08 Pinia 安装和基本使用
- 2024-12-08 Vue合理配置WebSocket并实现群聊