Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate data property in object literal not allowed in strict mode #606

Closed
codeuniquely opened this issue May 4, 2015 · 2 comments
Closed
Labels
component: icon button This is the name of the generic UI component, not the React module!

Comments

@codeuniquely
Copy link

Trying to build the project (and using Babel JS)

I get these error messages
(Something in the mergeAndPrefix => Extend chain is trying to create two copies of teh same property on these lines)

ERROR in ./lib/icon-button.jsx
Module parse failed: F:\Projects\app\node_modules\babel-loader\index.js?stage=1!F:\Projects\app\material-ui\src\icon-button.jsx Line 72:
Duplicate data property in object literal not allowed in strict mode
| transition: Transitions.easeOut(),
| padding: this.getSpacing().iconSize / 2,
| width: this.getSpacing().iconSize * 2,
| height: this.getSpacing().iconSize * 2
| },
@ ./lib/index.js 16:14-38

ERROR in ./lib/tabs/tab.jsx
Module parse failed: F:\Projects\app\node_modules\babel-loader\index.js?stage=1!F:\Projects\app\material-ui\src\tabs\tab.jsx Line 36:
Duplicate data property in object literal not allowed in strict mode
| textAlign: 'center',
| verticalAlign: 'middle',
| height: '48px',
| color: Colors.white,
| opacity: '.6',
@ ./lib/index.js 46:7-28

ERROR in ./lib/menu/subheader-menu-item.jsx
Module parse failed: F:\Projects\app\node_modules\babel-loader\index.js?stage=1!F:\Projects\app\material-ui\src\menu\subheader-menu-item.jsx Line 43:
Duplicate data property in object literal not allowed in strict mode
| height: subheaderHeight + gutterMini,
| lineHeight: subheaderHeight + 'px',
| color: this.getTheme().textColor,
| borderTop: 'solid 1px ' + this.getTheme().borderColor,
| paddingTop: gutterMini,
@ ./lib/menu/menu.jsx 17:24-56

ERROR in ./lib/styles/themes/light-theme.js
Module parse failed: F:\Projects\app\node_modules\babel-loader\index.js!F:\Projects\app\material-ui\src\styles\themes\light-theme.js Line 145:
Duplicate data property in object literal not allowed in strict mode
| separatorColor: 'rgba(0, 0, 0, .175)',
| menuHoverColor: 'rgba(0, 0, 0, .10)',
| menuHoverColor: Colors.white
| }
| };
@ ./lib/styles/theme-manager.js 9:9-40

ERROR in ./lib/enhanced-textarea.jsx
Module parse failed: F:\Projects\app\node_modules\babel-loader\index.js?stage=1!F:\Projects\app\material-ui\src\enhanced-textarea.jsx Line 101:
Duplicate data property in object literal not allowed in strict mode
| style: inputStyles,
| rows: this.props.rows,
| style: AutoPrefix.all(inputStyles),
| onChange: this._handleChange }))
| );
@ ./lib/text-field.jsx 13:23-53

@bsr203
Copy link

bsr203 commented May 7, 2015

+1 came here to raise the same issue :-)

For example, height and width are duplicates in icon-button.jsx.

 var styles = {
      root: {
        height: 48,
        width: 48,
        position: 'relative',
        boxSizing: 'border-box',
        transition: Transitions.easeOut(),
        padding: (this.getSpacing().iconSize / 2),
        width: this.getSpacing().iconSize*2,
        height: this.getSpacing().iconSize*2
      },

for the record. these are the duplicates.

icon-button.jsx Line 72
        height: 48,
        width: 48,
        width: this.getSpacing().iconSize*2,
        height: this.getSpacing().iconSize*2

tabs/tab.jsx Line 36:
      'height': '100%',
      'height': '48px',

menu/subheader-menu-item.jsx Line 43
        color: Typography.textDarkBlack,
        color: this.getTheme().textColor,

styles/light-theme.js Line 145
       menuHoverColor: 'rgba(0, 0, 0, .10)',
       menuHoverColor: Colors.white

enhanced-textarea.jsx Line 101
      style={inputStyles}
      style={AutoPrefix.all(inputStyles)}

pomerantsev added a commit to pomerantsev/material-ui that referenced this issue May 18, 2015
… to use all ES6 features

Fixes mui#655, mui#606, mui#440, mui#392.

Goals of this PR:
- being able to use all ES6 features (with babel)
- adding JSHint and cleaning up most obvious mistakes in code
- making it so that browserify doesn't throw an error when components'
  code changes while watching files
- minor cleanup of the dependencies in package.json files
@mmrtnz
Copy link
Contributor

mmrtnz commented May 22, 2015

Fixed with #656

@mmrtnz mmrtnz closed this as completed May 22, 2015
@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 25, 2022
@zannager zannager added component: icon button This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: icon button This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

5 participants