We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
main
1 parent d1faa4e commit f48530cCopy full SHA for f48530c
packages/iles/src/node/plugin/utils.ts
@@ -41,8 +41,12 @@ export async function tryInstallModule (name: string) {
41
}
42
43
export async function importLibrary<T> (pkgName: string) {
44
- const pkgPath = await tryInstallModule(pkgName)
45
- return await importModule(pkgPath)
+ try {
+ const pkgPath = await tryInstallModule(pkgName)
46
+ return await importModule(pkgPath)
47
+ } catch (error) {
48
+ return await importModule(pkgName)
49
+ }
50
51
52
async function withSpinner<T> (message: string, fn: () => Promise<T>) {
0 commit comments