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

Error toast when I choose Export into existing project #70

Closed
jzarca01 opened this issue Sep 3, 2018 · 4 comments
Closed

Error toast when I choose Export into existing project #70

jzarca01 opened this issue Sep 3, 2018 · 4 comments

Comments

@jzarca01
Copy link

jzarca01 commented Sep 3, 2018

Toast :

There was an error while creating your files. SyntaxError: Unexpected token (12:29) 10 | <HeaderComponent /> 11 | <Menu /> > 12 | <DataContainer category={new}/> | ^ 13 | </div> 14 | ); 15 |

However the files are created and the code inside seems good

@erikguntner
Copy link
Contributor

Interesting. If I understand correctly, the files are being written fine, but you are getting this toast error response from the UI instead of a successful response? From the error message it looks like there is an extra angled bracket at the end of line 12/13. Is that showing up in the exported code as well?

@jzarca01
Copy link
Author

jzarca01 commented Sep 4, 2018

Nope everything looks fine, however App was not exported
Here's my arborescence:
App
  HeaderComponent
  MenuComponent
  DataContainer
      ItemComponent

import React from 'react';
import PropTypes from 'prop-types';

const HeaderComponent = props => <div />;

HeaderComponent.propTypes = {};

export default HeaderComponent;
import React from 'react';
import PropTypes from 'prop-types';

const Menu = props => <div />;

Menu.propTypes = {};

export default Menu;
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ItemComponent from './ItemComponent.jsx';

class DataContainer extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    const { category } = this.props;
    return (
      <div>
        <ItemComponent itemInfo={{}} />
      </div>
    );
  }
}

DataContainer.propTypes = {
  category: PropTypes.string.isRequired,
};

export default DataContainer;
import React, { Component } from 'react';
import PropTypes from 'prop-types';

class ItemComponent extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    const { itemInfo } = this.props;
    return <div />;
  }
}

ItemComponent.propTypes = {
  itemInfo: PropTypes.object.isRequired,
};

export default ItemComponent;

@refinedblessing
Copy link
Contributor

@erikguntner have you been able to replicate this? @jzarca01 I haven't been able to replicate this, also just wondering if you performed any other actions

@jzarca01
Copy link
Author

jzarca01 commented Sep 6, 2018

Nope, just created those for components and tried to export them to a new empty folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants