Skip to content

在“正在构建应用程序”时出现问题:“Could not resolve "jszip"” #17

@jackshun2025

Description

@jackshun2025
01:16:53.078 ⛅️ wrangler 3.101.0
01:16:53.079 -------------------
01:16:54.122 ✘ [ERROR] Build failed with 1 error:
01:16:54.123  
01:16:54.123 ✘ [ERROR] Could not resolve "jszip"
01:16:54.123  
01:16:54.123 api/download/folder/[[path]].ts:2:23:
01:16:54.123 2 │ import JSZip = require('jszip');
01:16:54.124 ╵ ~~~~~~~
01:16:54.124  
01:16:54.124 You can mark the path "jszip" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.
01:16:54.124  
01:16:54.124  
01:16:54.125  
01:16:54.125  
01:16:54.126  
01:16:54.128 ✘ [ERROR] Build failed with 1 error:
01:16:54.128  
01:16:54.129 ✘ [ERROR] Could not resolve "jszip"
01:16:54.129  
01:16:54.129 api/download/folder/[[path]].ts:2:23:
01:16:54.129 2 │ import JSZip = require('jszip');
01:16:54.129 ╵ ~~~~~~~
01:16:54.129  
01:16:54.129 You can mark the path "jszip" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions