question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation problem

See original GitHub issue

I am a newbie. According to the documentation, there is a problem when using npm to install uppy. I use Windows10 OS, after installing npm, use the command line $ npm install @uppy/core @uppy/dashboard @uppy/tus, inside the folder. Generate a 140mb+ node_modules, there is no dist folder found, no uppy.min.js and uppy.min.css files are found; uppy is a good tool, but installing the deployment documentation is too simple, not for us newbie Friendly, of course, we can refer to the official cdn file, but this file is not all functions we can use, so I hope that the installation and deployment aspects can be more detailed, and can solve my installation problem.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
goto-bus-stopcommented, Jun 10, 2019

@maxence33 webpack doesn’t expose anything from modules by default. In your index.js file, you can do something like:

window.Uppy = require('@uppy/core')
Uppy.XHRUpload = require('@uppy/xhr-upload')
Uppy.Dashboard = require('@uppy/dashboard')
Uppy.Informer = require('@uppy/informer')
Uppy.AwsS3 = require('@uppy/aws-s3')
Uppy.StatusBar = require('@uppy/status-bar')

then you should be able to access the Uppy global variable and the Uppy.PluginName classes from your other scripts.

3reactions
dersar00commented, Dec 13, 2018

Hello @skycyclone After you installed uppy modules, you need to require it to your file where you want to use it, for example to create a <UppyDashboard /> component in react, your file should look like this

const React = require('react')
const Uppy = require('@uppy/core')
const Tus = require('@uppy/tus')
const GoogleDrive = require('@uppy/google-drive')
const Instagram = require('@uppy/instagram')
const Dropbox = require('@uppy/dropbox')
const { Dashboard } = require('@uppy/react')

export class UppyDashboard extends React.Component {
  constructor (props) {
    super(props)
  }

  componentWillMount () {
    this.uppy = new Uppy({ id: 'uppy', autoProceed: true, debug: true })
       .use(XHRUpload, { endpoint: 'https://api2.transloadit.com' })      
    });
  }

  componentWillUnmount () {
    this.uppy.close()
  }

  render () {
    return (
      <div id="UppyDashboard">
        <Dashboard
          uppy={this.uppy}
        />
      </div>
    )
  }
}

export default UppyDashboard;

Good luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix problems that block programs from being installed or ...
The Program Install and Uninstall troubleshooter helps you automatically repair issues when you're blocked from installing or removing programs.
Read more >
Fix problems installing Chrome - Google Chrome Help
Fix problems installing Chrome. If you get an error message when you try to download and install Google Chrome, try these fixes. Fix...
Read more >
Unable to Install Apps or Software on Windows? Here's What ...
If you're unable to install software on Windows 10 or Windows 11, here's how to fix common app installation problems.
Read more >
General installation problems - IBM
If you experience problems when installing IBM InfoSphere Information Server on a VMware ESX virtual computer, make sure that your system is not ......
Read more >
How to Fix the Most Common Windows 10 Installation Problems
Windows 10 includes a troubleshooter that can automatically detect and try to fix problems with updates and patches. If the problem isn't ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found