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

Module not found: Can't resolve 'module' in require-from-string #26

Open
yotavm opened this issue May 9, 2018 · 1 comment
Open

Module not found: Can't resolve 'module' in require-from-string #26

yotavm opened this issue May 9, 2018 · 1 comment
Labels
question Further information is requested

Comments

@yotavm
Copy link

yotavm commented May 9, 2018

i'm using create-react-map and this is my code

import React from 'react';
import styled from 'styled-components';
import toReactComponent from 'svgr.macro';

const Mask = toReactComponent('assets/icons/mask.svg');

class Icon extends React.Component {
  render() {
    return <StyledIcon {...this.props} />;
  }
}

const StyledIcon = styled(Mask)`
  width: 50px;
  height: 50px;
  & path {
    stroke: ${({ color }) => color};
  }
`;

export default Icon;

this is the error

/node_modules/require-from-string/index.js
Module not found: Can't resolve 'module' in '/Users/yotav/Desktop/500tech/projects/simplifi/client/node_modules/require-from-string
@evenchange4
Copy link
Owner

@yotavm I have no idea about this issue. :(
I use svgr.macro with styled-components^3.2.6 in my project without any errors.
It will be great to provide a standalone repo to reproduce it.

@evenchange4 evenchange4 added the question Further information is requested label May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants