- MAC 上处理error cb.apply is not a f
- SeetaFaceEngine教程For Mac OS X(1)
- 【多点续传下载工具】Free Download Manager
- 【多点续传下载工具】Free Download Manager
- postgres ERROR permission denied
- mac gitbook 错误”cb.apply is not a
- 解决Mac_java.net_Local_host_name_u
- Mac java.net Local host name unk
- Python-异常处理(exceptional handling
- 2022.02.09 修复 Windows 11 Update
我是在使用npx mrm lint-staged
时遇到报这个错误。以下是输出的log日志。
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/opt/homebrew/Cellar/node/16.3.0/bin/node',
1 verbose cli '/opt/homebrew/lib/node_modules/npx/node_modules/npm/bin/npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'mrm@latest',
1 verbose cli '--global',
1 verbose cli '--prefix',
1 verbose cli '/Users/york/.npm/_npx/49959',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli '--json'
1 verbose cli ]
2 info using npm@5.1.0
3 info using node@v16.3.0
4 verbose npm-session fc4e5fd1a63aa463
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 https://registry.npm.taobao.org/mrm 155ms (from cache)
8 silly pacote tag manifest for mrm@latest fetched in 171ms
9 verbose stack TypeError: cb.apply is not a function
9 verbose stack at /opt/homebrew/lib/node_modules/npx/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
9 verbose stack at FSReqCallback.oncomplete (node:fs:196:5)
10 verbose cwd /Users/york/Desktop/ReactProgram/jira
11 verbose Darwin 20.5.0
12 verbose argv "/opt/homebrew/Cellar/node/16.3.0/bin/node" "/opt/homebrew/lib/node_modules/npx/node_modules/npm/bin/npm-cli.js" "install" "mrm@latest" "--global" "--prefix" "/Users/york/.npm/_npx/49959" "--loglevel" "error" "--json"
13 verbose node v16.3.0
14 verbose npm v5.1.0
15 error cb.apply is not a function
16 verbose exit [ 1, true ]
不知道是因为什么原因导致的报错。这里只记录下帮我解决了的一种办法。
- Mac通过前往(GO)找到
/opt/homebrew/lib/node_modules/npx/node_modules/npm
这个目录下的npm
文件夹并删除 - 运行
brew install npm
,重新装载npm
安装过程中根据指引就可以了。
网友评论