Vue项目启动报This dependency was not found: * clipboard in ./node_modules/… 即找不到clipboard依赖

本文介绍了在将Springboot+Vue的survey项目集成到Vue前端项目时遇到的clipboard依赖缺失问题,提供了解决方案并指导了如何通过npm安装和确认安装路径。

问题还原:

项目中需要实现一个问卷调查的功能,由于时间紧急,所以找了下Git上开源的问卷相关项目,最终选型Springboot+Vue的survey项目。在前端集成到现有的Vue项目中后,启动项目,报了一个错误:This dependency was not found: * clipboard in ./node_modules/…。错误截图如下所示:
在这里插入图片描述

解决方案:

***这是由于没有安装clipboard依赖,***可以去项目根目录下的node_modules文件夹中找一下有没有clipboard相关的文件内容。
安装clipboard即可解决此问题。在命令行或者VSCode中,执行如下命令:
cnpm install clipboard –S 或者 npm install clipboard -S
安装完成后,在项目的根目录下node_modules文件夹中可以看到clipboard相关内容。截图如下所示:
在这里插入图片描述

PS:欢迎大家点赞、关注、支持。如有需要,欢迎添加博主QQ沟通交流!QQ:156587607

{ "name": "qiya", "version": "3.6.6", "description": "其亚管理系统", "author": "其亚", "license": "MIT", "scripts": { "dev": "vue-cli-service serve", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview" }, "keywords": [ "vue", "admin", "dashboard", "element-ui", "boilerplate", "admin-template", "management-system" ], "repository": { "type": "git", "url": "https://gitee.com/y_project/QiYa-Cloud.git" }, "dependencies": { "@riophae/vue-treeselect": "0.4.0", "axios": "^1.11.0", "clipboard": "2.0.8", "core-js": "3.37.1", "echarts": "5.4.0", "element-ui": "^0.2.6", "file-saver": "2.0.5", "fuse.js": "6.4.3", "highlight.js": "^11.11.1", "js-beautify": "1.13.0", "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", "nprogress": "0.2.0", "screenfull": "5.0.2", "sortablejs": "1.10.2", "splitpanes": "2.4.1", "vue": "2.6.12", "vue-count-to": "1.0.13", "vue-cropper": "0.5.5", "vue-router": "3.4.9", "vuedraggable": "2.24.3", "vuex": "^3.2.0" }, "devDependencies": { "@vue/cli-plugin-babel": "^5.0.8", "@vue/cli-service": "4.4.6", "babel-plugin-dynamic-import-node": "2.3.3", "chalk": "4.1.0", "compression-webpack-plugin": "6.1.2", "connect": "3.6.6", "sass": "1.32.13", "sass-loader": "10.1.1", "script-ext-html-webpack-plugin": "2.1.5", "svg-sprite-loader": "^2.0.3", "vue-template-compiler": "2.6.12" }, "engines": { "node": ">=8.9", "npm": ">= 3.0.0" }, "browserslist": [ "> 1%", "last 2 versions" ] } 帮我修改一下依赖,终端错:PS D:\桌面\开发项目\审计微信服务号项目\管理平台\qiya-ui> npm install element-ui --save npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: '@achrinza/node-ipc@9.2.2', npm warn EBADENGINE required: { node: '8 || 10 || 12 || 14 || 16 || 17' }, npm warn EBADENGINE current: { node: 'v22.13.0', npm: '11.1.0' } npm warn EBADENGINE } npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: '@achrinza/node-ipc@9.2.2', npm warn EBADENGINE required: { node: '8 || 10 || 12 || 14 || 16 || 17' }, npm warn EBADENGINE current: { node: 'v22.13.0', npm: '11.1.0' } npm warn EBADENGINE } removed 3 packages, and audited 2073 packages in 21s 165 packages are looking for funding run `npm fund` for details 142 vulnerabilities (3 low, 103 moderate, 24 high, 12 critical) To address issues that do not require attention, run: npm audit fix To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. 能不能全改成vue3生产环境的
08-21
C:\Users\Administrator\Desktop\最新反波\前端\anun\h5>npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: ap@1.0.0 npm ERR! Found: webpack@5.102.1 npm ERR! node_modules/webpack npm ERR! peer webpack@"^5.0.0" from filemanager-webpack-plugin@5.0.0 npm ERR! node_modules/filemanager-webpack-plugin npm ERR! dev filemanager-webpack-plugin@"^5.0.0" from the root project npm ERR! peer webpack@"^4.36.0 || ^5.0.0" from sass-loader@8.0.2 npm ERR! node_modules/sass-loader npm ERR! dev sass-loader@"^8.0.2" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! dev script-ext-html-webpack-plugin@"^2.1.4" from the root project npm ERR! npm ERR! Conflicting peer dependency: webpack@4.47.0 npm ERR! node_modules/webpack npm ERR! peer webpack@"^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" from script-ext-html-webpack-plugin@2.1.5 npm ERR! node_modules/script-ext-html-webpack-plugin npm ERR! dev script-ext-html-webpack-plugin@"^2.1.4" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2025-10-23T10_12_45_578Z-eresolve-report.txt npm ERR! A complete log of this run can be found in: C:\Users\Administrator\AppData\Local\npm-cache\_logs\2025-10-23T10_12_45_578Z-debug-0.log { "name": "ap", "version": "1.0.0", "description": "somes", "author": "ZED", "private": true, "scripts": { "dev": "vue-cli-service serve --open", "build": "vue-cli-service build", "stage": "vue-cli-service build --mode staging", "lint": "vue-cli-service lint" }, "dependencies": { "@better-scroll/core": "^2.2.1", "axios": "^0.19.2", "better-scroll": "^2.2.1", "clipboard": "^2.0.8", "concurrently": "^6.2.0", "core-js": "^3.6.4", "element-ui": "^2.15.2", "fastclick": "^1.0.6", "iscroll": "^5.2.0", "jquery": "^3.4.1", "js-base64": "^3.6.0", "js-md5": "^0.7.3", "lib-flexible": "^0.3.2", "lodash": "^4.17.15", "moment": "^2.29.1", "mouse-wheel": "^1.2.0", "qrcodejs2": "0.0.2", "qs": "^6.5.0", "regenerator-runtime": "^0.13.5", "smoothscroll-polyfill": "^0.4.4", "svgaplayerweb": "^2.3.2", "vant": "^2.10.2", "vue": "^2.6.11", "vue-clipboard2": "^0.3.1", "vue-i18n": "^8.26.7", "vue-infinite-loading": "^2.4.5", "vue-responsive-video-background-player": "^1.2.2", "vue-router": "^3.2.0", "vue-scrollactive": "^0.9.3", "vue-seamless-scroll": "^1.1.23", "vuex": "^3.4.0" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-router": "~4.5.0", "@vue/cli-plugin-vuex": "~4.5.0", "@vue/cli-service": "~4.5.0", "babel-eslint": "^10.1.0", "babel-plugin-component": "^1.1.1", "babel-plugin-import": "^1.13.0", "babel-plugin-transform-remove-console": "^6.9.4", "cross-env": "^7.0.3", "eslint": "^6.7.2", "eslint-plugin-vue": "^6.2.2", "filemanager-webpack-plugin": "^5.0.0", "i18n": "^0.13.3", "node-sass": "^4.14.1", "postcss-pxtorem": "^5.1.1", "sass-loader": "^8.0.2", "script-ext-html-webpack-plugin": "^2.1.4", "swiper": "^6.4.5", "uuidv4": "^6.2.12", "vue-template-compiler": "^2.6.11", "webpack-bundle-analyzer": "^3.8.0" } }
最新发布
10-24
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值