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

Unexpected character '�' (1:0) [0] > 1 | �PNG #25

Closed
sahilCampusdiaries opened this issue Jul 7, 2016 · 5 comments
Closed

Unexpected character '�' (1:0) [0] > 1 | �PNG #25

sahilCampusdiaries opened this issue Jul 7, 2016 · 5 comments

Comments

@sahilCampusdiaries
Copy link

Hello,

I am trying to use this boiler plate in my project, but I got this issue Unexpected character '�' (1:0)
[0] > 1 | �PNG, How can i resolved this issue, Kindly guide me.

@mz026
Copy link
Owner

mz026 commented Jul 7, 2016

Hi,

May I know how to reproduce this issue and the versions of your node and npm?
I cloned the repo from scratch, install dependencies and ran npm start and everything looks fine.

@sahilCampusdiaries
Copy link
Author

Hi,

I am trying to add img tag then It is showing errors.
like <img scr={require('../imagepath/a.png')}/>

@sahilCampusdiaries
Copy link
Author

<img width="262" height="262" src={require("../../statics/images/team/SumitSaurav.png")} alt="" />

@mz026
Copy link
Owner

mz026 commented Jul 7, 2016

I didn't use webpack to handle images in this boilerplate as it slows down the build time. To achieve what you want in the code snippet, try setting up the static path from express and access it from express.

Such as:

//express
server.use(Express.static(path.join(__dirname, '../..', 'statics')))

//component
<img width="262" height="262" src="/images/team/SumitSaurav.png" alt="" />

I'm going to close this issue for now.

@mz026 mz026 closed this as completed Jul 7, 2016
@sahilCampusdiaries
Copy link
Author

Thanks,

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

2 participants