当前位置: 首页 > news >正文

npm pnpm yarn 报错或常见问题处理集锦

各种卡死,报错问题处理汇总

1. npm 安装 卡死了怎么办,npm

# 切换源
npm config set registry https://registry.npmmirror.com
# 查看源
npm config get registry

2. pnpm安装 卡死了怎么办

方法1:切换源
npx pnpm config set registry https://registry.npmmirror.com

方法2:清除缓存
pnpm cache clean --force

3. npm install node-sass卡死不动, 切换源

解决方案1

node-sass 从 淘宝源下载

npm config set sass-binary-site https://npm.taobao.org/mirrors/node-sass

4. yarn install 卡死不动

解决方案1

将 yarn 源切换至淘宝源

yarn config set registry https://registry.npm.taobao.org

5. yarn install node-sass卡死不动

解决方案1

node-sass 从 淘宝源下载

yarn config set sass-binary-site https://npm.taobao.org/mirrors/node-sass

6. yarn install 遇到报错:info There appears to be trouble with your network connection. Retrying…

[2/4] Fetching 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 An unexpected error occurred: "https://registry.npmjs.org/echarts/-/echarts-4.9.0.tgz: connect ETIMEDOUT 104.16.1.35:443".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\Jindi J Sun\\Documents\\jin_files\\A_Backend_Project\\TRF\\TRF\\UI\\yarn-error.log".
解决方案1

除 yarn.lock 文件,重新执行

yarn install

7. yarn install 遇到报错:error commander@11.1.0: The engine “node” is incompatible with this module. Expected version “>=16”. Got “14.16.1” error Found incompatible module. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

解决方案1
 yarn config set ignore-engines true 

删除之前node-mdules ,重新执行

yarn install


8. 报错This dependency was not found,To install it, you can run: npm install --save vxe-table/lib/vxe-table

This dependency was not found:
- vxe-table/lib/vxe-table in ./src/plugins/vxetable.ts
To install it, you can run: npm install --save vxe-table/lib/vxe-table
解决方案:

查访此issue后得知:

  • 把package.json里babel-plugin-import版本前的 ^ 符号删掉
  • 删除node-modules包
  • 删除lock文件
  • 重新下载依赖

9. npm ERR! Maximum call stack size exceeded报错

解决方案如下:

1.更新npm版本

// 查看版本
npm -v
// 更新
npm install -g npm

2.删除node_module和package-lock.json

3.重新执行npm install

4.如果还不行,执行下面命令

npm cache clean --force

5.继续执行npm install

6.完美解决问题~~~~~

10. mac 配置yarn 环境,command not found: yarn,解决无法npm -g的情况遇到问题:zsh: command not found: yarn

解决方案

前提:电脑已安装node

node -v

全局安装

npm install yarn -g

如果这一步没有问题,就不需要往下看了,可以直接执行 yarn 命令了

11.mac 配置yarn 环境,如果遇到报错The operation was rejected by your operating system.npm ERR! It is likely you do not have the permissions to access this file as the current user

XXXX@CN_C02GXXX6M ~ % npm i yarn -g
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/yarn
npm ERR! dest /usr/local/lib/node_modules/.yarn-Jrexx8nI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/yarn' -> '/usr/local/lib/node_modules/.yarn-Jrexx8nI'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/yarn' -> '/usr/local/lib/node_modules/.yarn-Jrexx8nI'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/yarn',
npm ERR!   dest: '/usr/local/lib/node_modules/.yarn-Jrexx8nI'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

解决报错方案一:

sudo npm i yarn -g

解决报错方案二:(仅限电脑权限管控严格情况下,无法获取权限)

step1: 查看npm 全局文件安装地址
XXX@CN_CXXXMD6M ~ % npm list -g                    
/usr/local/lib
├── @quasar/cli@1.3.2
├── corepack@0.14.1
├── npm@8.19.2
└── yarn@1.22.18
step2: 从其他人电脑上同样的目录,拷贝出来两份文件,一个是命令的快捷方式文件,一个是环境变量所指的路径文件,粘贴到自己电脑相同位置
  • 命令快照文件


  • 全局命令所指文件

step3: 打开环境变量配置文件,配置环境变量
vim ~/.bash_profile

把下面内容粘贴到环境变量文件里,

export PATH=/usr/local/lib/node_modules/yarn/bin/:$PATH

保存.bash_profile的编辑,执行一下文件

source ~/.bash_profile

问题解决,大功告成

命令行重新打开,就可以使用yarn

yarn -v

12. MAC npm install -g 报错permission denied

参考我的这篇文章:超详细手把手教你四种方案彻底解决MAC npm install -g 报错permission denied

13. npm 启动项目报错 Cannot find module ‘@babel\compat-data\data\corejs3-shipped-proposals’

最近升级了系统的node ,webpack 等等,然后今天打开项目,突然启动不起来了~~
报错信息如下:
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module 'D:\\trunk\node_modules\@babel\compat-data\data\corejs3-shipped-proposals'
搜索了一下资料,按照解决方案来尝试
方案一:(尝试过后对我的项目没有用)
package.json中devDependencies对象添加
  "@babel/compat-data": "7.9.0"
方案二:执行下面命令,然后再重新启动
npm install -D babel-loader @babel/core @babel/preset-env webpack

14. mac npm install -g后仍然不行怎么办sudo: xxx: command not found

参考我这篇文章:多种方案教你彻底解决mac npm install -g后仍然不行怎么办sudo: xxx: command not found

15. 解决npm install各种报错的6种方案 Error: Command failed: cmd.exe autoreconf -ivf以及gifsicle pre-build test failed

参考我这篇文章:解决npm install各种报错的6种方案 Error: Command failed: cmd.exe autoreconf -ivf以及gifsicle pre-build test failed以及其他报错

16. nodejs 升级后, vue+webpack 项目 node-sass 报错的解决方法

如果按照此步骤执行有问题,请参考18 解决安装node-sass报错的方法

1.当我执行npm i node-sass -D 在错误提示里有给出了方案,重新构建 node-sass,命令如下:
npm rebuild node-sass --force

如果执行完成后不报错,就可以了。

如果报 gyp Error 错误:
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
....
gyp ERR! node -v v8.11.1 
gyp ERR! node-gyp -v v3.6.2
卸载 node-sass,然后重新安装。
npm uninstall node-sass
npm install node-sass 
rebuild
## 第一步:
npm rebuild node-sass
## 第二步:
npm update 

如果按照此步骤执行有问题,请参考18 解决安装node-sass报错的方法

17. npm install报错 npm ERR! gyp verb which failed Error: not found


PS C:\Users\xiaojin\Downloads\demo-master\demo-master> npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated consolidate@0.15.1: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.9.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.8.3: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated @babel/plugin-proposal-dynamic-import@7.8.3: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead.
npm WARN deprecated @babel/plugin-proposal-numeric-separator@7.8.3: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm WARN deprecated @babel/plugin-proposal-object-rest-spread@7.9.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.   
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated @babel/plugin-proposal-optional-catch-binding@7.8.3: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.
npm WARN deprecated @babel/plugin-proposal-unicode-property-regex@7.8.8: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.
npm WARN deprecated @babel/plugin-proposal-json-strings@7.8.3: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.
npm WARN deprecated @babel/plugin-proposal-async-generator-functions@7.8.3: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated core-js@2.6.11: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js-pure@3.6.5: core-js-pure@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js-pure.        
npm WARN deprecated core-js@3.6.5: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli   'C:\\Users\\xiaojin\\Downloads\\demo-master\\demo-master\\node_modules\\node-gyp\\bin\\node-gyp.js',      
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@21.1.0 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\which\which.js:89:16      
npm ERR! gyp verb `which` failed     at C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\isexe\index.js:42:5       
npm ERR! gyp verb `which` failed     at C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\isexe\windows.js:36:5     
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:199:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\which\which.js:89:16      
npm ERR! gyp verb `which` failed     at C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\isexe\index.js:42:5       
npm ERR! gyp verb `which` failed     at C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\isexe\windows.js:36:5     
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:199:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Python311\python.EXE
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Command failed: C:\Python311\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:422:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:515:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1105:16)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm ERR! gyp ERR! System Windows_NT 10.0.22621
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xiaojin\\Downloads\\demo-master\\demo-master\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="  
npm ERR! gyp ERR! cwd C:\Users\xiaojin\Downloads\demo-master\demo-master\node_modules\node-sass
npm ERR! gyp ERR! node -v v21.1.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xiaojin\AppData\Local\npm-cache\_logs\2023-12-09T01_37_06_169Z-debug-0.log
PS C:\Users\xiaojin\Downloads\demo-master\demo-master>
解决方案1
# before installing node-gyp on windows
npm install --global --production windows-build-tools# install node-gyp globally
npm install -g node-gyp
解决方案2

在项目根目录下创建.npmrc

sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

18. 解决安装node-sass报错的方法

方案1:使用淘宝镜像
npm set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass
方:2:下载源码放到本地搞~~ 适合内网开发的苦孩子们~~~
  • 先进入https://github.com/sass/node-sass/releases下载自己需要的包
  • 可以点击tags然后找到自己需要的,然后进行下载
  • 举例:下载下面这个

https://github.com/sass/node-sass/releases/download/v4.13.1/win32-x64-79_binding.node

  • 下好后,放到本地的文件夹里,使路径如下
C://Users//AAAAAA//AppData//Roaming//npm-cache//node-sass//4.13.1//win32-x64-79_binding.node
  • 然后按顺序复制下面的代码到命令行
set SASS_BINARY_PATH="C://Users//AAAAAA//AppData//Roaming//npm-cache//node-sass//4.13.1//win32-x64-79_binding.node"
npm install node-sass@3.4.1

19. 待补充

  • 然后你会发现,安装成功了~~~~

  • 今天就写到这里啦~

  • 小伙伴们,( ̄ω ̄( ̄ω ̄〃 ( ̄ω ̄〃)ゝ我们明天再见啦~~

  • 大家要天天开心哦

欢迎大家指出文章需要改正之处~
学无止境,合作共赢

在这里插入图片描述

欢迎路过的小哥哥小姐姐们提出更好的意见哇~~

相关文章:

npm pnpm yarn 报错或常见问题处理集锦

各种卡死&#xff0c;报错问题处理汇总 1. npm 安装 卡死了怎么办&#xff0c;npm # 切换源 npm config set registry https://registry.npmmirror.com # 查看源 npm config get registry2. pnpm安装 卡死了怎么办 方法1&#xff1a;切换源 npx pnpm config set registry h…...

【Git】常用的Git操作集合

常用的Git操作集合 1. 分支操作1.1 查看本地所有分支git branch 1.2 查看所有分支&#xff08;包含本地远程仓库&#xff09;git branch -a 1.3 切换分支git checkout test 2. 常用基本操作2.1 查看 git 各存储区内(文件)状态git status 2.2 查看工作区与暂存区文件差异git dif…...

JavaScript库jquery的使用方法

"写更少&#xff0c;做更多"是jquery的设计理念&#xff0c;jquery是一个兼容多浏览器的JavaScript库&#xff0c;利用jquery的语法设计能使开发更便捷。 网页添加jquery的方法:1.从jquery.com下载库&#xff1b;2.从CDN中载入库&#xff08;示例使用&#xff09;&a…...

Vue (v-bind指令、el与data的两种写法、理解MVVM、数据代理、V-no事件处理、双向数据绑定V-model、登陆页面实现

V-bind指令 el与data两种写法 MVVM 数据代理 V-no事件处理 V-no用于监听DOM对象 双向数据绑定V-model v-model 指令用来在 input、select、textarea、checkbox、radio 等表单控件元素上创建双向数据绑定&#xff0c;根据表单上的值&#xff0c;自动更新绑定的元素的值。 按钮的…...

SpringBoot - SpringBoot手写模拟SpringBoot启动过程

依赖 建一个工程&#xff0c;两个Module: 1. springboot模块&#xff0c;表示springboot框架的源码实现 2. user包&#xff0c;表示用户业务系统&#xff0c;用来写业务代码来测试我们所模拟出来的SpringBoot 首先&#xff0c;SpringBoot是基于的Spring&#xff0c;所以我…...

40. 组合总和 II - 力扣(LeetCode)

题目描述 给定一个候选人编号的集合 candidates 和一个目标数 target &#xff0c;找出 candidates 中所有可以使数字和为 target 的组合。 candidates 中的每个数字在每个组合中只能使用 一次 。 注意&#xff1a;解集不能包含重复的组合。 输入示例 candidates [10,1,2,7,…...

第15届蓝桥杯嵌入式省赛准备第二天总结笔记(使用STM32cubeMX创建hal库工程+按键输入)

一.查看电路图 按键是使用的PB0,PB1,PB2,PA0四个引脚&#xff0c;然后使用CubeMX配置引脚&#xff0c;4个脚都配置为输入模式和上拉。 程序生成之后把不用的删掉&#xff0c;需要的留下&#xff0c;这里我把函数名改了。 然后写按键扫描读取程序&#xff0c;这里参考的正点原子…...

【论文阅读】One For All: Toward Training One Graph Model for All Classification Tasks

目录 0、基本信息1、研究动机2、创新点——One For All &#xff1a;unique features3、准备4、具体实现4.1、用TAGs统一来自不同领域的图数据4.2、用NOI&#xff08;NODES-OF-INTEREST&#xff09;统一不同图任务4.2.1、NOI子图4.2.2、NOI提示结点 4.3、用于图的上下文学习&am…...

Python多线程爬虫——数据分析项目实现详解

前言 前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家&#xff1a;https://www.captainbed.cn/z 「个人网站」&#xff1a;雪碧的个人网站 ChatGPT体验地址 文章目录 前言爬虫获取cookie网站爬取与启动CS…...

unity全局音量管理/全局音量设置与音量设置界面(含静音功能)

前言 本文将会介绍如何使用audiomixer实现全局音量控制&#xff0c;并且会介绍如何实现游戏内的含静音功能的音量设置界面。 本人也是个初学者&#xff0c;在看过一些关于音量管理的教程后&#xff0c;发现使用audiomixer实现全局音量控制可能是最方便、功能最完备、强大的&a…...

C++ vector 数组转换、查找、最大最小值、排序、排行的几种用法

C vector中常用到排序、取最值&#xff0c;一些场景可能还会要计算某个元素的排行&#xff0c;以下就是一些实际例子&#xff0c;精简、有效。 【1】会涉及到数组转vector&#xff1a; vector<int> v(arr, arr N); // N为数组size&#xff0c;可用sizeof(arr)/sizeof(i…...

vmware 安装Rocky-9.3系统

安装系统截图 安装完成&#xff0c;启动 查看版本和内核 开启远程登陆授权 1、编辑配置文件 #提升权限&#xff0c;输入su,并输入密码 su #编辑ssh文件开启root远程登陆 vi /etc/ssh/sshd_config找到以下内容&#xff1a;#PermitRootLogin prohibit-password 添加&#xff1a…...

C++提高编程——模板

本专栏记录C学习过程包括C基础以及数据结构和算法&#xff0c;其中第一部分计划时间一个月&#xff0c;主要跟着黑马视频教程&#xff0c;学习路线如下&#xff0c;不定时更新&#xff0c;欢迎关注。 当前章节处于&#xff1a; ---------第1阶段-C基础入门 ---------第2阶段实战…...

单线程、同步、异步、预解析、作用域、隐式全局变量、对象创建、new

单线程 进程 cpu 资源分配的最小单位一个进程可以有多个线程 线程 cpu调度的最小单位线程建立在进程的建立基础上的一次程序的运行单位 线程分为&#xff1a;单线程 多线程 单线程&#xff1a;js是单线程 &#xff08;同一个时间只能完成一个任务&#xff09;多线程&…...

《设计模式的艺术》笔记 - 外观模式

介绍 外观模式中外部与一个子系统的通信通过一个统一的外观角色进行&#xff0c;为子系统中的一组接口提供一个一致的入口。外观模式定义了一个高层接口&#xff0c;这个接口使得子系统更加容易使用。外观模式又称为门面模式&#xff0c;它是一种对象结构型模式。 实现 myclas…...

sql 查询时间范围内的数据

要查询特定时间范围内的数据&#xff0c;您可以使用 SQL 中的 BETWEEN 运算符。以下是一个示例查询&#xff0c;它从名为 your_table 的表中检索在 start_date 和 end_date 之间创建的所有记录&#xff1a; SELECT * FROM your_table WHERE created_date BETWEEN start_date AN…...

TestNG中的@BeforeSuite注释

目录 什么是BeforeSuite注解&#xff1f; BeforeSuite带注释的方法何时执行&#xff1f; BeforeSuite annotation有什么用&#xff1f; 所以&#xff0c;是时候集思广益了 我们可以在一个类中使用多个BeforeSuite注释方法吗&#xff1f; BeforeSuite放在超类上时如何工作…...

[学习笔记]刘知远团队大模型技术与交叉应用L3-Transformer_and_PLMs

RNN存在信息瓶颈的问题。 注意力机制的核心就是在decoder的每一步&#xff0c;都把encoder的所有向量提供给decoder模型。 具体的例子 先获得encoder隐向量的一个注意力分数。 注意力机制的各种变体 一&#xff1a;直接点积 二&#xff1a;中间乘以一个矩阵 三&#xff1a;…...

图像处理工具包Pillow的使用分享

Pillow 是 Python 中一个流行的图像处理库&#xff0c;它是 PIL&#xff08;Python Imaging Library&#xff09;的一个友好的分支版本。Pillow 提供了许多功能&#xff0c;使得图像处理变得容易和方便。下面是一些基本用法和示例&#xff1a; 安装 Pillow 首先&#xff0c;你…...

python进程间通信——命名管道(Named Pipe、FIFO)

文章目录 Python中的命名管道&#xff1a;深入理解进程间通信1. 命名管道简介2. 创建和删除命名管道3. 写入命名管道4. 读取命名管道5. 示例&#xff1a;进程间通信write_to_pipe.pyread_from_pipe.py测试运行 6. 注意事项和限制命名管道的半双工机制命名管道读写任意一方未打开…...

从BOM到MES:制造业核心系统全解析,新手也能看懂

从BOM到MES&#xff1a;制造业核心系统全解析&#xff0c;新手也能看懂 走进任何一家现代化制造企业的生产车间&#xff0c;你会看到的不再是传统印象中机器轰鸣、工人忙碌的简单场景&#xff0c;而是由各种数字化系统精密协调运作的智能生态。对于刚接触制造业的新人来说&…...

盘姬工具箱:一款值得收藏的免费无广告系统维护神器

在日常使用电脑的过程中&#xff0c;我们难免会遇到各种各样的问题。 系统崩溃、文件误删、右键菜单混乱、网络故障等等&#xff0c;这些问题都让人头疼不已。 为了解决这些问题&#xff0c;很多用户会安装各种专门的工具软件。 但每安装一个软件&#xff0c;都会占用磁盘空…...

2026年西安市莲湖区Geo搜索优化排名,专业企业究竟谁能拔得头筹?

在数字化浪潮席卷的今天&#xff0c;Geo搜索优化&#xff08;地理搜索优化&#xff09;对于企业的重要性不言而喻。尤其在西安市莲湖区&#xff0c;企业们对于提升自身在Geo搜索中的排名需求愈发迫切。究竟哪家专业企业能够在2026年的竞争中脱颖而出&#xff0c;成为Geo搜索优化…...

Laravel 11重磅更新:10大核心特性解析

Laravel 11.x&#xff08;2024年3月发布&#xff09;引入了多项重要更新&#xff0c;主要特性如下&#xff1a; 1. 精简项目结构 默认移除了 app/Http/Kernel.php 和 app/Console/Kernel.php&#xff0c;中间件配置迁移至 bootstrap/app.php&#xff1a; ->withMiddleware(…...

HoRain云--OpenCod安装

&#x1f3ac; HoRain 云小助手&#xff1a;个人主页 ⛺️生活的理想&#xff0c;就是为了理想的生活! ⛳️ 推荐 前些天发现了一个超棒的服务器购买网站&#xff0c;性价比超高&#xff0c;大内存超划算&#xff01;忍不住分享一下给大家。点击跳转到网站。 目录 ⛳️ 推荐 …...

Claued code多用户部署

winserver多用户使用Claude code CCSwitch 公司服务器是内网隔离的&#xff0c;使用模型需要配置代理服务器&#xff0c;目前又有内网的ai开发需求&#xff0c;需通过服务器配置claudeclaude配置代理api key的方式使用ai。 使用CCswitch claude code能更方便切换ai模型&#…...

生物信息学实战:如何用k-mer分析提升基因组测序质量(附Python代码示例)

生物信息学实战&#xff1a;k-mer分析在基因组测序质量提升中的关键作用 基因组测序数据的质量直接影响后续分析的可靠性&#xff0c;而k-mer分析技术正成为生物信息学工具箱中不可或缺的利器。想象一下&#xff0c;当你拿到一批新的测序数据时&#xff0c;如何快速识别其中的低…...

STM32堆栈原理与内存管理实践指南

1. 堆栈基础概念解析在嵌入式系统开发中&#xff0c;堆栈(Stack)是最基础也是最重要的内存管理机制之一。简单来说&#xff0c;堆栈就是一块特殊组织方式的内存区域&#xff0c;采用"后进先出"(LIFO)的原则进行数据存取。理解堆栈的工作原理对于STM32开发至关重要&am…...

计算机高速缓存模拟实验:原理与C语言实现

1. 计算机高速缓存模拟实验概述在计算机体系结构中&#xff0c;高速缓存&#xff08;Cache&#xff09;是CPU和主存之间的关键缓冲层&#xff0c;它通过局部性原理显著提升了数据访问效率。这个实验项目通过C语言编程完整模拟了高速缓存的工作机制&#xff0c;包括缓存行结构、…...

开箱即用!Qwen3-VL-8B AI聊天系统一键启动,小白也能玩转

开箱即用&#xff01;Qwen3-VL-8B AI聊天系统一键启动&#xff0c;小白也能玩转 1. 项目概览&#xff1a;你的智能聊天助手 想象一下&#xff0c;你刚拿到一个功能强大的AI聊天系统&#xff0c;不需要任何复杂配置&#xff0c;就像打开一个新买的智能音箱一样简单。这就是Qwe…...