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

webpack方式应用出错 #42

Closed
yuzifu opened this issue Jan 18, 2019 · 2 comments
Closed

webpack方式应用出错 #42

yuzifu opened this issue Jan 18, 2019 · 2 comments

Comments

@yuzifu
Copy link

yuzifu commented Jan 18, 2019

在Vux项目里安装了cos-js-sdk-v5,先引用COS,然后实例化出错。

import { COS } from 'cos-js-sdk-v5'

const cos = new COS(...)

出错信息是:

Uncaught TypeError: E.COS is not a constructor
@carsonxu
Copy link
Collaborator

试试:
import COS from 'cos-js-sdk-v5'
或者
var COS = require('cos-js-sdk-v5');

@yuzifu
Copy link
Author

yuzifu commented Jan 18, 2019

谢谢

@yuzifu yuzifu closed this as completed Jan 18, 2019
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