Skip to content

Module fails to build #5

@cafca

Description

@cafca

I tried using this module with a fresh installation of create-react-app. Starting npm I receive errors related to usage of the object spread operator.

My steps:

  1. $ npx create-react-app dnr-test

  2. $ yarn add react-dnr

  3. Placed the code from the Readme's example section into src/index.js

  4. Removed line 47 referencing background image

  5. Replaced

    import DnR from '../modules/DnR';
    import {OSXTheme, WindowsTheme} from '../modules/themes';

with

import DnR from 'react-dnr/modules/DnR';
import {OSXTheme, WindowsTheme} from 'react-dnr/modules/themes';

Result:

./node_modules/react-dnr/modules/DnR.jsx
Module parse failed: Unexpected token (150:27)
You may need an appropriate loader to handle this file type.
|     } = this.props
| 
|     const pervFrameRect = {...this.frameRect}
| 
|     if (this.clicked) {

Other things I tried

Importing from either the es6 or lib folders leads to this error:

TypeError: Cannot read property 'oneOfType' of undefined
./node_modules/react-dnr/es6/DnR.js
node_modules/react-dnr/es6/DnR.js:414

My system:
OS X 10.13.3
node v9.11.1
yarn 1.5.1
react-dnr@0.4.0

Any help would be very appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions