npm install Unexpected token in JSON at position

npm install Unexpected token in JSON at position XXX
重新安装了node,使用node -v,npm -v也都能正常查看
C:\Users\xxx>node -v
v14.18.2

C:\Users\xxx>npm -v
6.14.15

但是使用npm下载vue或者其他东西的时候就会报错,在网上找了很多办法,清缓存,设置镜像都试过,但是都没用,这是为什么呀
C:\Users\xxx>npm install -g vue-cli
npm ERR! Unexpected token < in JSON at position 0 while parsing near 'html>
npm ERR! npm install express -g
npm ERR! Unexpected token < in JSON at position 0 while parsing near 'html>
npm ERR! 
这是2022-12-28T07_00_26_169Z-debug.log的内容
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'express',
1 verbose cli   '-g'
1 verbose cli ]
2 info using npm@6.14.15
3 info using node@v14.18.2
4 verbose npm-session b33ec0d86af98a60
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 http://1.1.1.2/ac_portal/proxy.html?template=default&tabs=pwd&vlanid=0&url=https://registry.npmjs.org%2Fexpress 161ms
8 silly fetchPackageMetaData error for express@latest Unexpected token < in JSON at position 0 while parsing near '
8 silly fetchPackageMetaData '
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 209ms
11 verbose stack SyntaxError: Unexpected token < in JSON at position 0 while parsing near '
11 verbose stack '
11 verbose stack     at JSON.parse ()
11 verbose stack     at parseJson (C:\Program Files\nodejs\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
11 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50
11 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:95:5)
12 verbose cwd C:\Users\xxx
13 verbose Windows_NT 10.0.19043
14 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express" "-g"
15 verbose node v14.18.2
16 verbose npm  v6.14.15
17 error Unexpected token < in JSON at position 0 while parsing near '
17 error '
18 verbose exit [ 1, true ]

已解决
代理设置有问题

npm config set proxy="IP地址:端口"
npm config set https-proxy="IP地址:端口"

可以在C:\Users\用户名路径下的.npmrc文件查看是否设置成功
此时运行可能会报下面这个错

C:\Users\xxx>npm install express -g
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

清一下缓存就可以啦

npm cache clean --force