Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 6.18.1 版本在 next.js 框架下以及 nodejs v18.14.2 环境中提示依赖 proxy-agent implementation 找不到 #1267

Open
0xinhua opened this issue Dec 15, 2023 · 1 comment

Comments

@0xinhua
Copy link

0xinhua commented Dec 15, 2023

版本信息:

  • node.js v18.14.2
  • next.js 14.0.4-canary.17
  • ali-oss 6.18.1

问题:

  • 能正常上传图片资源,但上传完后开发环境会报错提示两个包找不到,来自 ali-oss 中的 urllib 包:
  23 |     // if implementation specified, require it
> 24 |     var lib = require(implementation)
2 |     debug('create new proxy %s', proxy);
  23 |     // lazy require, only support node >= 4
> 24 |     proxyAgent = proxyAgents[proxy] = new (require('proxy-agent'))(proxy);

image

@YunZZY
Copy link
Collaborator

YunZZY commented Dec 18, 2023

麻烦手动安装一下proxy-agent 5.x版本,urllib 2.X里将其作为了一个可选的peerDependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants