为了账号安全,请及时绑定邮箱和手机立即绑定

最新的 npm cra 安装错误

最新的 npm cra 安装错误

www说 2022-06-05 16:04:34
刚刚更新到 npm 6.14.4,当我尝试使用 cra-template 创建一个新应用程序时,会出现此错误。我该如何解决?npx create-react-app sphinx.ui.react错误日志50 timing stage:runTopLevelLifecycles Completed in 5234ms51 verbose stack SyntaxError: Unexpected token : in JSON at position 18277 while parsing near '...true,"daizch":true}}:true,"akabeko":true...'51 verbose stack     at JSON.parse (<anonymous>)51 verbose stack     at parseJson (C:\Users\Altanbagana\AppData\Roaming\npm\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)51 verbose stack     at C:\Users\Altanbagana\AppData\Roaming\npm\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:5051 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:97:5)52 verbose cwd C:\Users\Altanbagana\Documents\Programming\Web Projects53 verbose Windows_NT 10.0.1836354 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Altanbagana\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "create-react-app@latest" "--global" "--prefix" "C:\\Users\\Altanbagana\\AppData\\Roaming\\npm-cache\\_npx\\5552" "--loglevel" "error" "--json"55 verbose node v12.16.156 verbose npm  v6.14.457 error Unexpected token : in JSON at position 18277 while parsing near '...true,"daizch":true}}:true,"akabeko":true...'58 verbose exit [ 1, true ]
查看完整描述

2 回答

?
翻过高山走不出你

TA贡献1875条经验 获得超3个赞

尝试卸载该版本,然后重新安装所需的版本,我遇到了 discord.js 的这个问题 - 在我这样做之后它工作了



查看完整回答
反对 回复 2022-06-05
?
慕雪6442864

TA贡献1812条经验 获得超5个赞

我不小心更改了我的注册表。这是我的错xD。改回默认修复它

npm config set registry https://registry.npmjs.com/


查看完整回答
反对 回复 2022-06-05
  • 2 回答
  • 0 关注
  • 255 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号