利用ES6语法使用七牛官方sdk,'qn'一直出错

1、代码上下文

var qn = require('qn')
var client = qn.create({
  accessKey: 'y9Ehh4K2i6o4IjCu8kvo0dT319kk2Xbx6O9nJ',
  secretKey: 'V-fzA71AJ1oRnLHcJN4YAYOaz2kFW0MuakJj',
  bucket: 'resources',
  origin: 'up-z1.qiniu.com'
  // timeout: 3600000, // default rpc timeout: one hour, optional
  // if your app outside of China, please set `uploadURL` to `http://up.qiniug.com/`
  // uploadURL: 'http://up.qiniu.com/',
})

2、webpack编译时输出

WARNING in ./~/qn/lib/client.js
         94:14-27 Critical dependency: the request of a dependency is an expression
         
         WARNING in ./~/any-promise/register.js
         24:14-37 Critical dependency: the request of a dependency is an expression
         Child html-webpack-plugin for "index.html":
             chunk    {0} index.html 541 kB [entry] [rendered]
                 [0] ./~/lodash/lodash.js 540 kB {0} [built]
                 [1] ./~/html-webpack-plugin/lib/loader.js!./app/index.ejs 1.1 kB {0} [built]
                 [2] (webpack)/buildin/module.js 517 bytes {0} [built]

3、错误信息入下:

./~/qn/lib/client.js
94:14-27 Critical dependency: the request of a dependency is an expression

无法定位具体是哪里的问题,所以请求是否有人了解!

阅读 3.2k
1 个回答

循环依赖了。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进