Skip to content

Uncaught ReferenceError: process is not defined - Chrome browser Console error  #241

Description

@neps-in

I get the following Console error, request you to help me on this, Let me know if you need any other info.

Uncaught ReferenceError: process is not defined
    at Object../node_modules/path/path.js (path.js:25:1)
    at Object.options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at fn (hot module replacement:61:1)
    at Object../node_modules/mime-types/index.js (index.js:16:1)
    at Object.options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at fn (hot module replacement:61:1)
    at Object../node_modules/react-s3-uploader/s3upload.js (s3upload.js:6:1)
    at Object.options.factory (react refresh:6:1)

I get this above error, It's a simple experiment to upload the file.

ReactUploader.js

var ReactS3Uploader = require('react-s3-uploader');
    
<ReactS3Uploader
    signingUrl="http://127.0.0.1:5000/create-presigned-s3-url/"
    signingUrlMethod="GET"
    accept="image/*"
    s3path=""
    preprocess={this.onUploadStart}
    onSignedUrl={this.onSignedUrl}
    onProgress={this.onUploadProgress}
    onError={this.onUploadError}
    onFinish={this.onUploadFinish}
    // signingUrlHeaders={{ additional: headers }}
    // signingUrlQueryParams={{ additional: queryparams }}
    signingUrlWithCredentials={ true }      // in case when need to pass authentication credentials via CORS
    uploadRequestHeaders={{ 'x-amz-acl': 'public-read' }}  // this is the default
    contentDisposition="auto"
    scrubFilename={(filename) => filename.replace(/[^\w\d_\-.]+/ig, '')}
    server=""
    inputRef={cmp => this.uploadInput = cmp}
    autoUpload={true}
    />

export default ReactS3Uploader;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions