githublitao / api_automation_test

接口自动化测试平台(老平台移步master_old分支)
MIT License
1.56k stars 842 forks source link

[root@ecs-2734 frontend]# npm install 失败 #85

Closed xiaozhitaba closed 1 year ago

xiaozhitaba commented 3 years ago

39562 warn webpack-dev-middleware@3.7.3 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself. 39563 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents): 39564 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 39565 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin 39565 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any 39565 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux 39565 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64 39566 verbose stack Error: chromedriver@2.46.0 install: node install.js 39566 verbose stack Exit status 1 39566 verbose stack at EventEmitter. (/usr/local/nodejs/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 39566 verbose stack at EventEmitter.emit (events.js:315:20) 39566 verbose stack at ChildProcess. (/usr/local/nodejs/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 39566 verbose stack at ChildProcess.emit (events.js:315:20) 39566 verbose stack at maybeClose (internal/child_process.js:1048:16) 39566 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) 39567 verbose pkgid chromedriver@2.46.0 39568 verbose cwd /alidata01/api_automation_test-master/frontend 39569 verbose Linux 3.10.0-1062.1.1.el7.x86_64 39570 verbose argv "/usr/local/nodejs/bin/node" "/usr/local/bin/npm" "install" 39571 verbose node v14.16.0 39572 verbose npm v6.14.11 39573 error code ELIFECYCLE 39574 error errno 1 39575 error chromedriver@2.46.0 install: node install.js 39575 error Exit status 1 39576 error Failed at the chromedriver@2.46.0 install script. 39576 error This is probably not a problem with npm. There is likely additional logging output above. 39577 verbose exit [ 1, true ]

947612227 commented 2 years ago

记录下我的心酸里程 框架部署

pip install -r requirements.txt #会有报错的 pip install https://github.com/darklow/django-suit/tarball/v2 #31

进入 api_automation_test/settings.py 配置数据库信息

进入到manage.py 同目录下

执行django初始化流程 python3 manage.py makemigrations python3 manage.py migrate python3 manage.py createsuperuser

切换npm镜像 npm config set registry https://registry.npm.taobao.org 查看当前镜像 npm config get registry

前端vue部署 进入 frontend目录 cd ...../api_automation_test/frontend 安装 npm run build #可能会有报错

cnpm install node-sass

ERROR:Node Sass version 6.0.1 is incompatible with ^4.0.0. 卸载 npm uninstall node-sass

安装 npm install node-sass@4.14.1 如有报错 重装淘宝镜像 npm install -g cnpm --registry=https://registry.npm.taobao.org

再次安装 npm run build

启动服务 python manage.py runserver 0:80 # 0是本地所有IP地址,80是端口

但是我发现登录超级慢,而且也没进到系统里面 。。。。