Closed alejandoing closed 5 years ago
What command triggers that error? How can we reproduce it?
My HomePage component:
import React from 'react'
import styled from 'styled-components'
import { font, palette } from 'styled-theme'
import { IconLink } from 'components'
const Title = styled.h1`
font-family: ${font('primary')};
color: ${palette({ primary: 3 }, 1, true)};
text-align: center;
`
const HomePage = () => {
return (
<div>
<Title palette="primary">Hello World!</Title>
<IconLink to="/" icon="arc" height={100} />
</div>
)
}
export default HomePage
The error is generated in this line:
import { IconLink } from 'components'
The same error happens in other components. What could be?
Got it. But how this error occurs? Is this a plugin on your editor? Are you running a command (npm run something
) etc.?
The error is produced when run this command npm run start
This can be your webpack/babel configuration. Does this happen for you on a clean fork of ARc? Otherwise, could you provide a repository where this happens?
Thanks. I have made a new clean installation and not it works perfect. Surely it was a mistake in the configuration of my webpack.
Hi. I've had problems with import components. Someone can you help me?
For example, when I try import this component:
import { IconLink } from 'components'
I get this error:
Module not found: Can't resolve 'components'
My index.js file: