1.背景 最近换了笔记本,重新搭建了环境,顺手记录下脚本之类的,后续再遇到懒得一个个文件夹创建了。 2.node及npm安装 2.1 解压安装 我习惯安装的是解压版:点击此处下载 下载完成后,会得到压缩包,解压到指定位置即可。 例如,我放在了: D:\toolkit\node\20.17.0 解压后
-- 设置镜像C:\Users\Administrator>npmconfigsetregistryhttps://registry.npm.taobao.org/ -- 获取设置的镜像是否成功C:\Users\Administrator>npmconfiggetregistry-- 结果https://registry.npm.taobao.org/ 2,清除缓存 -- 清除npm缓存 npm cache clean --force 结果:npm WARN using --force Recommended protecti...
pnpm 创建的 node_modules 默认并非扁平结构,因此代码无法对任意软件包进行访问 2 pnpm install 问题:安装的依赖库证书过期 原因:使用的是老的淘宝镜像,淘宝不在维护。 解决办法:设置淘宝最新的镜像源。 npm config set registry https://registry.npmmirror.com 然后再次使用pnpm install 3 升级pnpm npm install -...
set-ExecutionPolicy RemoteSigned 选择Y,回车,再次安装pnpm,就可以显示安装成功了。
pnpm add @pnpm/dependency-path Usage constdependencyPath=require('@pnpm/dependency-path')constregistry='https://registry.npmjs.org/'console.log(dependencyPath.isAbsolute('/foo/1.0.0'))//> false// it is confusing currently because relative starts with /.// It will be changed in the future ...
PNPM install wipes entire drive and uses the drive as a node_modules foldertype: bug #9010 openedJan 25, 2025bysimon-schuster 1 of 4 tasks 1 shell-emulatordoes not interpret variables in single quotes, requires escaped double quotestype: bug ...
pnpm uses a content-addressable filesystem to store all files from all module directories on a disk. When using npm, if you have 100 projects using lodash, you will have 100 copies of lodash on disk. With pnpm, lodash will be stored in a content-addressable storage, so: ...
node_modules\.pnpm\lmdb@2.5.2\node_modules\lmdb>if not defined npm_config_node_gyp (node"C:\Users\sa830268\Documents\dev\bin\node-v18.9.0-win-x64│ gyp info it worked if it ends with ok│ gyp info using node-gyp@9.1.0│ gyp info using node@18.9.0 | win32 | x64│ gyp info...
npm install webpack webpack-cli --save-dev 1. 这时候到E盘下,已经自动创建了相关的文件夹 在webpack-demo目录下新建index.html和src文件下,src文件夹里新建index.js文件 project目录: webpack-demo |- package.json |- node_modules |- index.html ...
解决办法(一):执行npm i --force,跳过版本兼容,强制拉包 (推荐)解决办法(二):把type-eslint改成v7.7.0版本,如下: type-eslint开源社团也在积极的升级拥抱Eslint v9,更新的很快: husky v9 作用 husky 是一个 Git 钩子工具,可以在提交代码时自动检测到代码提交时修改的文件,然后执行相应的检查命令。