浏览代码

Note that the <script> tag should come at the bottom of the page

See https://github.com/transloadit/uppy/issues/1042
Artur Paikin 6 年之前
父节点
当前提交
d92809ab6b
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      packages/@uppy/core/src/Plugin.js

+ 3 - 1
packages/@uppy/core/src/Plugin.js

@@ -134,7 +134,9 @@ module.exports = class Plugin {
     }
 
     this.uppy.log(`Not installing ${callerPluginName}`)
-    throw new Error(`Invalid target option given to ${callerPluginName}`)
+    throw new Error(`Invalid target option given to ${callerPluginName}. Please make sure that the element 
+      exists on the page, or that the plugin you are targeting has been installed. Check that the <script> tag initializing Uppy 
+      comes at the bottom of the page, before the </body> (see https://github.com/transloadit/uppy/issues/1042).`)
   }
 
   render (state) {