Browse Source

Merge pull request #1043 from transloadit/chore/plugin-error-msg

[core/plugin] Note that the <script> tag should come at the bottom of the page
Artur Paikin 6 years ago
parent
commit
c3e77e18a1
1 changed files with 3 additions and 1 deletions
  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 closing </body> tag (see https://github.com/transloadit/uppy/issues/1042).`)
   }
 
   render (state) {