"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20250111/8eaf11a9df4e7031efe7efc13f829b7c.png) 如图所示,没有任何代码报错,"yarn"调用"vite",vite的exitcode为1。 点解?可能原因是什么?
yarn 安装 qmarkdown 报 yarn 网络错误 想使用 quasar 的 qmarkdown "https://qmarkdown.netlify.app/developing/using-qmarkdown" (https://link.segmentfault.com/?enc=wVU%2FOrCcroGLe8tifoSu1Q%3D%3D.v7LEyRLmYwaYM3yNCVWPZ01RJI5WbguDkyT6gjbEiLbAXSUBeTkB2wQBY03Y%2Bb4AXOPjaFfEIvJ7kQl65IMOrg%3D%3D) 感觉用法很优雅 所以我参考 "https://madewith.cn/649" (https://link.segmentfault.com/?enc=AijeKT2lkkZaNfaps52t%2Bw%3D%3D.pjAy3h5Ub2RXGfnm1V0gKeQcCSybm8XQYGccihboGeU%3D) 使用 yarn 安装 qmarkdown 但是报错了,莫名其妙 ─➤ yarn add @quasar/qmarkdown 130 ↵ yarn add v1.22.21 [1/4] 🔍 Resolving 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... info There appears to be trouble with your network connection. Retrying... error Error: read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. 然后我参考 "https://segmentfault.com/a/1190000040660323" (https://segmentfault.com/a/1190000040660323) 设置了淘宝镜像,在安装更加不行了 ╰─➤ yarn config set registry https://registry.npm.taobao.org 1 ↵ yarn config v1.22.21 success Set "registry" to "https://registry.npm.taobao.org". ✨ Done in 0.02s. ─➤ yarn add @quasar/qmarkdown yarn add v1.22.21 [1/4] 🔍 Resolving packages... error Error: certificate has expired at TLSSocket.onConnectSecure (node:_tls_wrap:1539:34) at TLSSocket.emit (node:events:513:28) at TLSSocket._finishInit (node:_tls_wrap:953:8) at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:734:12) info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. 是因为不存在这个包,还是真的是网络问题? "图片.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241006/3a1460ecdceddbab791c465faebc4ddb.png) "https://www.npmjs.com/search?q=qmarkdown" (https://link.segmentfault.com/?enc=XbSVAmCImgAV6W5HlESlqA%3D%3D.yU1UkGnQoml%2Fieigx51QZQ%2BCXxL%2B9YnWm7Ynt9HOXDkgrmVaheELdIVGFaFRb%2B0y) *** 重新找了一个包:"https://qmarkdown.netlify.app/all-about-qmarkdown/installatio..." (https://link.segmentfault.com/?enc=WkeX2YaRYDYnY%2FYidmILuA%3D%3D.wYHFiEMXBz93rFn78XwmZBDO6VPUQfvRtBQ%2B30ESXid6YAesL%2FA88i1lCIv8TnAH0CTU38T8c5pnzy%2BfNIyJ0qKTnDSk1eWrLwujGL2Bv58%3D) 安装还是报错 ─➤ yarn add @quasar/quasar-ui-qmarkdown@next 1 ↵ yarn add v1.22.21 info No lockfile found. [1/4] 🔍 Resolving 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... info There appears to be trouble with your network connection. Retrying... error Error: read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. 我按照 "https://stackoverflow.com/questions/51508364/yarn-there-appears-to-be-trouble-with-your-network-connection-retrying" (https://link.segmentfault.com/?enc=ifeyT7Wl0OvMD%2FJEP58oZw%3D%3D.j%2FMsWCWUSVziUSL1mmkJ%2FxFignRjba5uLUGJgwwYtoEq4Gc4o1dHuGRuiaOW5hciTWvh%2FXMKwD31BQnhVmwN4R22kBxcKLvzLiFbc02%2BlLC1mmymIbSoOr96e0c5K2ixsYajzTclSBL3ZoYH0hE0iFLA7ngsQx5X20fsz%2Bb1vT8%3D) 里面的把 yarn.lock 删除之后,重新执行 "yarn add @quasar/quasar-ui-qmarkdown@next" 还是一样的报错
我的yarn版本是v1.22.19。 我有一个刚刚clone下来的项目,直接yarn install有问题,我想改下依赖。于是就先yarn add sass,结果它开始读取我的package.json,开始疯狂下载其他依赖,不安装我指定的单个依赖。 这个问题怎么解决呢? "Clip_2024-01-29_10-40-42.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241012/24f5dbc90e938662760db1b5a8cd7062.png) "Clip_2024-01-29_10-41-09.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241012/8adcb65f372e3d91b67b6943ae1036fe.png)
为什么安装 @quasar/quasar-ui-qmarkdown 之后报错 Can't resolve 'quasar' 衔接上一个问题:"yarn 安装 qmarkdown 报 yarn 网络错误?" (https://segmentfault.com/q/1010000044726179) { "name": "tracking-king", "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, "dependencies": { "@ant-design/icons-vue": "^7.0.1", "@quasar/quasar-ui-qmarkdown": "^2.0.0-beta.10", "ant-design-vue": "^3.2.20", "axios": "^1.4.0", "core-js": "^3.8.3", "echarts": "^5.4.2", "element-plus": "^2.3.4", "vue": "^3.2.13", "vue-json-viewer": "^3.0.4", "vue-request": "^2.0.4", "vue-router": "^4.1.6" }, "devDependencies": { "@babel/core": "^7.12.16", "@babel/eslint-parser": "^7.12.16", "@vue/cli-plugin-babel": "~5.0.0", "@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-service": "~5.0.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", "less": "^4.1.3", "less-loader": "^11.1.3" }, "eslintConfig": { "root": true, "env": { "node": true }, "extends": [ "plugin:vue/vue3-essential", "eslint:recommended" ], "parserOptions": { "parser": "@babel/eslint-parser" }, "rules": { "vue/multi-word-component-names": 0, "vue/no-unused-components": "off", "no-unused-vars": "off" } }, "browserslist": [ "> 1%", "last 2 versions", "not dead", "not ie 11" ] } "图片.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241006/59c5f9f5f092f324f240d80a0369958d.png) 已经安装上了,再按照 "https://qmarkdown.netlify.app/all-about-qmarkdown/installatio..." (https://link.segmentfault.com/?enc=p6ryz8WBmqLqlk4NlShyhQ%3D%3D.MAFjDRA0rDNkD403rJxZhJXl%2F9t8X7rLGwvjk%2BeL8%2BU%2BYuEsUFmbLn%2BKLqGwC7ik7f5OUPTisByzQf9e2ac%2Benk8bmoVjTDnefTZOsAq2yU%3D) 提示修改 "src/main.js" "图片.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241006/aa5cb7a8ce9a5b17ba98de2c88559c42.png) import { createApp } from "vue"; import App from "./App.vue"; import router from "./router"; // import Antd from "ant-design-vue"; // import "ant-design-vue/dist/antd.css"; import Antd from "ant-design-vue"; import "ant-design-vue/dist/antd.css"; import JsonViewer from "vue-json-viewer"; import TopBar from "@/components/common/TopBar.vue"; import { boot } from 'quasar/wrappers' import Plugin from '@quasar/quasar-ui-qmarkdown' import '@quasar/quasar-ui-qmarkdown/dist/index.css' const app = createApp(App).use(router).use(Antd).use(JsonViewer).use(Plugin); app.component("top-bar", TopBar); app.mount("#app"); 但是使用 "yarn serve" 启动就报错了, 这是为什么呢? ERROR Failed to compile with 2 errors 2:24:20 PM error in ./node_modules/@quasar/quasar-ui-qmarkdown/dist/index.esm.js Module not found: Error: Can't resolve 'quasar' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king/node_modules/@quasar/quasar-ui-qmarkdown/dist' error in ./src/main.js Module not found: Error: Can't resolve 'quasar/wrappers' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king/src' ERROR in ./node_modules/@quasar/quasar-ui-qmarkdown/dist/index.esm.js 14:0-68 Module not found: Error: Can't resolve 'quasar' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king/node_modules/@quasar/quasar-ui-qmarkdown/dist' @ ./src/main.js 12:0-49 14:69-75 ERROR in ./src/main.js 11:0-39 Module not found: Error: Can't resolve 'quasar/wrappers' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king/src' webpack compiled with 2 errors *** 使用 boot 之后还是会报错 import { createApp } from "vue"; import App from "./App.vue"; import router from "./router"; // import Antd from "ant-design-vue"; // import "ant-design-vue/dist/antd.css"; import Antd from "ant-design-vue"; import "ant-design-vue/dist/antd.css"; import JsonViewer from "vue-json-viewer"; import TopBar from "@/components/common/TopBar.vue"; import { boot } from 'quasar/wrappers' import Plugin from '@quasar/quasar-ui-qmarkdown' import '@quasar/quasar-ui-qmarkdown/dist/index.css' boot(() => { const app = createApp(App); app .use(router) .use(Antd) .use(JsonViewer) .use(Plugin); app.component("top-bar", TopBar); app.mount("#app"); }); 日志 ERROR Failed to compile with 2 errors 3:20:57 PM error in ./node_modules/@quasar/quasar-ui-qmarkdown/dist/index.esm.js Module not found: Error: Can't resolve 'quasar' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king/node_modules/@quasar/quasar-ui-qmarkdown/dist' error in ./src/main.js Module not found: Error: Can't resolve 'quasar/wrappers' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king/src' ERROR in ./node_modules/@quasar/quasar-ui-qmarkdown/dist/index.esm.js 14:0-68 Module not found: Error: Can't resolve 'quasar' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king/node_modules/@quasar/quasar-ui-qmarkdown/dist' @ ./src/main.js 12:0-49 16:48-54 ERROR in ./src/main.js 11:0-39 Module not found: Error: Can't resolve 'quasar/wrappers' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king/src' webpack compiled with 2 errors *** 我的项目使用 vue cli 创建的 所以我换用 「Vue project from src」 "图片.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241006/7a51c5132a789a016f3e26b2e72fa0de.png) import { createApp } from "vue"; import App from "./App.vue"; import router from "./router"; import Antd from "ant-design-vue"; import "ant-design-vue/dist/antd.css"; import JsonViewer from "vue-json-viewer"; import TopBar from "@/components/common/TopBar.vue"; import Plugin from "@quasar/quasar-ui-qmarkdown/src/QMarkdown.js"; import "@quasar/quasar-ui-qmarkdown/src/QMarkdown.sass"; const app = createApp(App).use(router).use(Antd).use(JsonViewer).use(Plugin); app.component("top-bar", TopBar); app.mount("#app"); 但是还是报错了 ERROR Failed to compile with 2 errors 3:53:26 PM error in ./node_modules/@quasar/quasar-ui-qmarkdown/src/components/QMarkdown.js Module not found: Error: Can't resolve 'quasar' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king/node_modules/@quasar/quasar-ui-qmarkdown/src/components' Failed to resolve loader: sass-loader You may need to install it. ERROR in ./node_modules/@quasar/quasar-ui-qmarkdown/src/components/QMarkdown.js 15:0-68 Module not found: Error: Can't resolve 'quasar' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king/node_modules/@quasar/quasar-ui-qmarkdown/src/components' @ ./node_modules/@quasar/quasar-ui-qmarkdown/src/QMarkdown.js 1:0-76 4:0-68 4:0-68 7:2-11 8:2-25 11:18-32 11:34-43 @ ./src/main.js 8:0-66 10:69-75 ERROR in ./src/main.js 9:0-56 Module not found: Error: Can't resolve 'sass-loader' in '/Users/ponponon/Desktop/code/work/pon-it/tracking-king' webpack compiled with 2 errors *** "yarn add quasar" 之后,quasar 相关的报错没有了 *** 但是 "yarn add sass-loader sass" 遇到了 node 版本报错 ─➤ yarn add sass-loader sass 1 ↵ yarn add v1.22.21 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... warning Pattern ["vue-demi@latest"] is trying to unpack in the same destination "/Users/ponponon/Library/Caches/Yarn/v6/npm-vue-demi-0.14.7-8317536b3ef74c5b09f268f7782e70194567d8f2-integrity/node_modules/vue-demi" as pattern ["vue-demi@*","vue-demi@*"]. This could result in non-deterministic behavior, skipping. error sass-loader@14.1.1: The engine "node" is incompatible with this module. Expected version ">= 18.12.0". Got "16.20.1" error Found incompatible module. info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. 我很奇怪,yarn 不会自动帮我选择一个可用版本吗? *** "yarn add sass-loader sass" 问题,我通过 nvm 切换到 nodejs18.x 解决了
执行安装命令 "yarn" 报错以下信息 [1/5] 🔍 Validating package.json... warning knight-operation: "dependencies" has dependency "@testing-library/jest-dom" with range "^4.2.4" that collides with a dependency in "devDependencies" of the same name with version "^5.11.6" warning knight-operation: "dependencies" has dependency "@testing-library/react" with range "^9.3.2" that collides with a dependency in "devDependencies" of the same name with version "^11.2.2" [2/5] 🔍 Resolving packages... warning Resolution field "css-loader@3.4.2" is incompatible with requested version "css-loader@4.3.0" [3/5] 🚚 Fetching packages... error http://registry.m.jd.com/fsevents/download/fsevents-1.2.7.tgz: Integrity check failed for "fsevents" (computed integrity doesn't match our records, got "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw== sha1-Z79X9HWPAu3oj7KhcS/vTRU1i+M=") [4/5] 🔗 Linking dependencies... warning " > css-loader@3.4.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". warning " > @dada/custom@0.2.10" has incorrect peer dependency "lodash@^4.17.15". warning "webpack-config-single-spa-react > webpack-config-single-spa > standalone-single-spa-webpack-plugin@1.2.1" has unmet peer dependency "webpack@*". error Error: ENOENT: no such file or directory, open '/Users/wangling86/Library/Caches/Yarn/v6/npm-fsevents-1.2.11-4851b664a3783e52003b3c66eb0eee1074933aa4-integrity/node_modules/fsevents/.yarn-metadata.json' info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 请问如何解决呀,试了网上找到的很多方法都无效,如下,求助 yarn cache clean yarn install --network-timeout 10000000 yarn install --network-concurrency 1 rm -rf node_modules **/node_modules rm -rf yarn.lock **/yarn.lock yarn config set "strict-ssl" false -g
在使用 Travis Ci 构建 Hexo 时出现了构件失败的情况,报错信息为 : error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. The command "eval yarn --frozen-lockfile " failed. Retrying, 2 of 3.
1.在任意目录下执行 pnpm ls -g ERROR The configured global bin directory "/xxx" is not in PATH For help, run: pnpm help list 2.在存在pnpm-lock文件的项目下执行:pnpm ls -g 结果不报错 请问是什么原因造成报错的呢?
又一个yarn的问题 ̄□ ̄|| 在容器执行命令安装依赖 "yarn" "image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20240929/a222c30bfa9d02c67af3f1b0238ea0c0.png) 试了以下很多方法也还是不行,求助 yarn cache clean yarn install --network-timeout 10000000 yarn install --network-concurrency 1 rm -rf node_modules **/node_modules rm -rf yarn.lock **/yarn.lock yarn config set "strict-ssl" false -g
错误信息如下: gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python=\"C:\\Path\\To\\python.exe\" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python \"C:\\Path\\To\\python.exe\" gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation gyp ERR! find Python **********************************************************
yarn vue3项目打包后将dist根目录上传nginx web根目录,"http://aaa.com/index.html" (https://link.segmentfault.com/?enc=aQCadgRo%2Bh54%2BMtrENKKtA%3D%3D.DvuFyyjLYkhE7ARSSPs%2BPXCo0ySZF6ZFTKW521Pc5Ps%3D) 这个index.html就是dist生成的,我没有上传dist这个文件夹,直接把里面的静态文件上传web根目录。 第一次请求后,会跳转到aaa.com/login进行登录,登录完成进入aaa.com/home显示正常 但是将aaa.com/home刷新就会显示404,我在nginx配置添加:try_files $uri $uri/ /index.html; 然后正常,但是刷新后不断请求api接口,F12请求上百次 我手动访问api接口: aaa.com/admin/getadmin, aaa.com/api/getuser, aaa.com/index/getmenu, 这三个api全部是前端展示的,并没有走vue 代理 如果不添加nginx配置 try_files $uri $uri/ /index.html; 访问全部正常如下: { "code": 401, "msg": "登录不合法" } 也就是说访问首页404和api接口冲突,请问这个如何解决?感谢路过的大佬!!! 我使用的是Vue createWebHistory模式