log4js 记录不同类型的日志 0001年1月1日 1 分钟阅读 官网:npm上的log4js地址 当前使用的log4js版本的 3.0.5 , 1.X 版本不能这么写 写配置 log_config.js 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Npm
moment.js 轻松管理日期和时间 0001年1月1日 2 分钟阅读 moment.js 不依赖任何第三方库,支持字符串、Date、时间戳以及数组等格式,可以像 PHP 的 date() 函数一样,格式化日期时间,计算相对时间,获取特定时间后的日期时 Npm
npm --build-from-source install 解决安装包的时候卡住的问题 0001年1月1日 1 分钟阅读 问题场景 遇到了一个问题,安装 grpc 的时候,一直没有办法拉下来,卡在了 node-pre-gyp WARN Using request for node-pre-gyp https download 安装这个包,依赖了node-pre-gyp; 解决办法 从源头构 Npm
npm install web3 安装失败的解决办法 0001年1月1日 2 分钟阅读 在 window 的时候安装 web3.js 失败了; 报错信息如下, Administrator@DDEX7BK7XCS2QTJ MINGW32 /e/local/web3-eth $ npm install web3 –save npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Suppor t npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue > scrypt@6.0.3 preinstall E:\local\web3-eth\node_modules\scrypt > node node-scrypt-preinstall.js > websocket@1.0.24 install Npm
Npm openssl sha file not found include 0001年1月1日 2 分钟阅读 mac openssl sha.h file not found include .md build Electron 项目时候遇到的错误 OKAY take it away `electron-builder` • electron-builder version=19.56.2 • loaded configuration file=package.json ("build" field) • writing effective config file=build/electron-builder.yaml • rebuilding native production dependencies platform=darwin arch=x64 Error: /usr/local/bin/node exited with code 1 Output: > argon2@0.19.3 install /Users/broszhu/Documents/wifisong-test/canonchain-wallet/node_modules/argon2 > node-gyp rebuild CC(target) Release/obj.target/libargon2/argon2/src/opt.o CC(target) Release/obj.target/libargon2/argon2/src/argon2.o CC(target) Release/obj.target/libargon2/argon2/src/core.o CC(target) Release/obj.target/libargon2/argon2/src/blake2/blake2b.o CC(target) Release/obj.target/libargon2/argon2/src/thread.o CC(target) Npm
npm publish 发布包时报错 publish Failed PUT 401 0001年1月1日 1 分钟阅读 场景 :发布 Npm 包时候,报错了; 执行npm publish, 开始报错了 npm ERR! publish Failed PUT 401 npm ERR! code E401 npm ERR! 404 unauthorized Login first: zhubangbang npm ERR! 404 npm ERR! 404 ‘zhubangbang’ is not in the npm registry. npm ERR! 404 Npm
Npm 永久修改代理为淘宝源 0001年1月1日 1 分钟阅读 注意:不要使用 cnpm!cnpm 安装的模块路径比较奇怪,开发 react native 时候 packager 不能正常识别! npm config set registry https://registry.npm.taobao.org --global npm config set disturl https://npm.taobao.org/dist --global 注意这些在下载包的时候是可以正常 Npm
Npm 私服的增删改查 0001年1月1日 2 分钟阅读 私服使用部分 这部分是npm私服的使用部分 使用的是Verdaccio来实现的,具体可以参考 Verdaccio教程 nrm使用 nrm 是一个管理npm源 Npm
npm-error-cb-nerver-called 0001年1月1日 1 分钟阅读 tags: [“Npm”] title: npm ERR! cb() never called! 解决办法 title_sidebar: npm ERR! cb() never called first_dir_alias: anbang-blog second_dir_name: Npm draft: false order: 150.00001 tags: [“Npm”] 错误的场景 执行 npm install 命令时,出现了 npm ERR! cb() never called!错误 引起的原因 我有装一个nrm Npm
使用 Verdaccio 搭建 Npm 私服 0001年1月1日 3 分钟阅读 私服搭建部分 这部分是搭建的 安装 npm install -g verdaccio 测试是否成功 $> verdaccio warn --- config file - /home/.config/verdaccio/config.yaml warn --- http address - http://localhost:4873/ - verdaccio/3.0.0 如果可以访问 http://localhost:4873/ 就代表可以了 pm2启动 启动是全局安装路径下的 Npm