Skip to content

Cannot use import statement outside a module #1301

Open
@codeOnRunning

Description

项目是ts的,
import OSS from 'ali-oss'

new OSS({
...
}) 以后,调试代码报了以下错误:
\node_modules\ali-oss\lib\common\utils\lowercaseKeyHeader.ts:1
import { isObject } from './isObject';
^^^^^^

SyntaxError: Cannot use import statement outside a module

Activity

ko1o

ko1o commented on Nov 27, 2024

@ko1o

同样的问题 请问你解决了吗? @codeOnRunning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Cannot use import statement outside a module · Issue #1301 · ali-sdk/ali-oss