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

不支持 deno #56

Open
vangie opened this issue Jul 20, 2023 · 2 comments
Open

不支持 deno #56

vangie opened this issue Jul 20, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@vangie
Copy link

vangie commented Jul 20, 2023

在代码里import * as lark from "https://esm.sh/@larksuiteoapi/[email protected]";执行时报错

error: Uncaught SyntaxError: The requested module '/v128/[email protected]/denonext/axios.mjs' does not provide an export named 'AxiosError'
    at <anonymous> (https://esm.sh/v128/@larksuiteoapi/[email protected]/denonext/node-sdk.mjs:3:74)

好像是这个版本 axios 不支持 esm

@mazhe-nerd
Copy link
Collaborator

是的,axios1.0 修改了打包方式,打出了esm:https://github.com/axios/axios/pull/4596/files,我看看是否具备升级的条件

@vangie
Copy link
Author

vangie commented Jul 28, 2023

@mazhe-nerd

我当前解法是搞一个deno.json,加上importmaps

  "imports": {
    "https://esm.sh/v129/[email protected]/denonext/axios.mjs": "https://esm.sh/v129/[email protected]/denonext/axios.mjs"
  }

是可以用的,不过有个讨厌的问题,中间那个esm.sh的版本号会变化v128->v129->v130 要不停的更新。最好还是官方依赖一个更新一点的axios版本

@mazhe-nerd mazhe-nerd added the enhancement New feature or request label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants