nrm报错

报错

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
internal/validators.js:112
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^

[TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at validateString (internal/validators.js:112:11)
at Object.join (path.js:375:7)
at Object.<anonymous> (C:\Users\wy\AppData\Roaming\npm\node_modules\nrm\cli.js:17:20)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)
at internal/main/run_main_module.js:17:11
] {
code: 'ERR_INVALID_ARG_TYPE'
}

解决

找到nrm安装位置,打开cli.js修改第17行

windows下目录在C:\Users\用户名\AppData\Roaming\npm\node_modules\nrm\

1
2
//const NRMRC = path.join(process.env.HOME, '.nrmrc'); (删除)
const NRMRC = path.join(process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'], '.nrmrc');

Shadowrocket最新解锁TikTok(>17.9.0)脚本

  • 2021/7/15测试20.3.0版本可用
  • 2021/7/7测试20.2.0版本可用
  • 2021/7/1测试20.1.0版本可用
  • 2021/6/25测试20.0.0版本可用
  • 2021/6/20测试19.9.0版本可用
  • 2021/6/15测试19.8.1版本可用
  • 2021/6/10测试19.8.0版本可用
  • 2021/6/5测试19.7.0版本可用
  • 2021/5/29测试19.6.0版本可用
  • 2021/5/21测试19.5.1版本可用
  • 2021/5/19测试19.5.0版本可用
  • 2021/5/8测试19.3.0版本可用
  • 2021/4/30测试19.2.0版本可用
  • 2021/4/22测试19.1.0版本可用
  • 2021/4/15测试19.0.0版本可用
  • 2021/4/8测试18.9.0版本可用
  • 2021/4/1测试18.8.5版本可用
  • 2021/3/27测试18.8.0版本可用
  • 2021/3/24测试18.7.5版本可用
1
2
3
4
5
6
7
8
9
10
11
[URL Rewrite]
(?<=_region=)CN(?=&) US 307
(?<=&mcc_mnc=)4 2 307
^(https?:\/\/dm[\w-]+\.\w+\.com\/.+)(\?)(.+) $1$3 302
(^https?:\/\/*\.\w{4}okv.com\/.+&.+)(\d{2}\.3\.\d)(.+) $118.0$3 302

ctier=[A-Z] ctier=A 302
^https:\/\/[\s\S]*\.googlevideo\.com/.*&(oad|ctier) _ REJECT

[MITM]
hostname = *.tiktokv.com, *.byteoversea.com, *.tik-tokapi.com, *.googlevideo.com

Windows下RSSHub执行NPM i报错.md

背景

今天fork了一份RSSHub准备玩一下,发现 npm i的时候一直报错

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://github.com/BYVoid/OpenCC/releases/download/1.1.1/opencc-v1.1.1-node-v72-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for opencc@1.1.1 and node@12.14.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS checking VS2017 (15.9.28307.1321) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - found VC++ toolset: v141
gyp ERR! find VS - missing any Windows SDK
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8

原因

在Windows下安装到一些库时,需要编译,所以要按相关环境

解决

  • 管理员打开 CMD
  • 运行 npm install --g --production windows-build-tools
    1
    2
    3
    4
    5
    6
    7
    8
    ---------- Visual Studio Build Tools ----------
    Successfully installed Visual Studio Build Tools.
    ------------------- Python --------------------
    Successfully installed Python 2.7

    Now configuring the Visual Studio Build Tools and Python...

    All done!
    成功

再次执行npm i就成功了

参考

使用Vercel托管博客

背景

由于服务器到期,又刚好看到Vercel可以提供免费的一站式托管服务,而且还能绑定自己的域名,因此把博客迁移到此平台上了。目前博客源码在 github 上,只要提交代码 Vercel 即可自动发布,十分的方便。

阅读更多