Skip to content

Error when bundling the npm distro with Vite. #100

Description

@hjcafaro

When trying to import the @parse/react library using the npm distro and bundling with vite, the import fails with the following error:

inherits.js:9 Uncaught TypeError: Super expression must either be null or a function
    at _inherits (inherits.js:9:11)
    at LiveQueryClient.js:274:18
    at node_modules/parse/lib/browser/LiveQueryClient.js (LiveQueryClient.js:759:1)
    at __require2 (chunk-W7STUX7H.js?v=aa49bf2b:18:50)
    at node_modules/parse/lib/browser/ParseLiveQuery.js (ParseLiveQuery.js:25:47)
    at __require2 (chunk-W7STUX7H.js?v=aa49bf2b:18:50)
    at node_modules/parse/lib/browser/Parse.js (Parse.js:339:19)
    at __require2 (chunk-W7STUX7H.js?v=aa49bf2b:18:50)
    at node_modules/parse/index.js (index.js:1:18)
    at __require2 (chunk-W7STUX7H.js?v=aa49bf2b:18:50)

This is another example of this issue: parse-community/Parse-SDK-JS#1362 from the Parse-sdk-js repo, and the error stems from the same line of code. The following .jsx file will reproduce the issue.

import * as React from 'react';

import { initializeParse } from '@parse/react';

function App() {
  return (
      <h1> Hello</h1>
  );
}

export default App;

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions