error in ./node_modules/swagger-ui-react/swagger-ui.js

后端提示:
 ERROR  Failed to compile with 1 errors                                                         12:29:51 PM

 error  in ./node_modules/swagger-ui-react/swagger-ui.js

Module not found: Error: Can't resolve 'btoa' in '/home/ubuntu/adp/myapp/node_modules/swagger-ui-react'


● MFSU █████████████████████████ cache (99%)
 begin idle

✔ Webpack


ERROR in ./node_modules/swagger-ui-react/swagger-ui.js 2:107055-107070
Module not found: Error: Can't resolve 'btoa' in '/home/ubuntu/adp/myapp/node_modules/swagger-ui-react'
 @ ./node_modules/swagger-ui-react/index.js 13:0-61 59:15-35 65:53-65
 @ ./src/.umi/.cache/.mfsu/mf-va_swagger-ui-react.js 1:0-33 2:15-16
 @ container entry ./swagger-ui-react[0]

webpack compiled with 1 error
null
Error: build failed
    at /home/ubuntu/adp/m ya l l/node_modules/@umijs/bundler-webpack/lib/index.js:172:29
    at /home/ubuntu/adp/myap p/node_modules/@umijs/deps/compiled/webpack/5/bundle5.js:114591:14
    at processQueueWorker (/home/ubuntu/adp/myapp/node_modules/@umijs/deps/compiled/webpack/5/bundle5.js:114529:6)
    at processTicksAndRejections (node:internal/process/task_queues:78:11)

解决方法:

yarn add swagger-ui-react
yarn start
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值