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

react-html-email fails to compile when building #55

Open
borisyordanov opened this issue Jan 14, 2018 · 11 comments
Open

react-html-email fails to compile when building #55

borisyordanov opened this issue Jan 14, 2018 · 11 comments

Comments

@borisyordanov
Copy link

I have an app built with create-react-app. When i run the build command i get this error:
image

Here is my package.json

{
  "name": "enjoy-copenhagen",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "axios": "^0.17.1",
    "bootstrap": "4.0.0-beta.2",
    "classnames": "^2.2.5",
    "currency-formatter": "^1.3.1",
    "draft-js": "^0.10.4",
    "firebase": "^4.6.2",
    "font-awesome": "^4.7.0",
    "money": "^0.2.0",
    "node-sass-chokidar": "0.0.3",
    "npm-run-all": "^4.1.2",
    "rand-token": "^0.4.0",
    "react": "^16.1.1",
    "react-dom": "^16.1.1",
    "react-draft-wysiwyg": "^1.12.2",
    "react-dropzone": "^4.2.3",
    "react-html-email": "^3.0.0",
    "react-redux": "^5.0.6",
    "react-router-dom": "^4.2.2",
    "react-router-redux": "^4.0.8",
    "react-scripts": "1.0.17",
    "reactstrap": "5.0.0-alpha.4",
    "redux": "^3.7.2",
    "redux-form": "^7.1.2",
    "redux-i18n": "^1.5.10",
    "redux-thunk": "^2.2.0",
    "simple-line-icons": "^2.4.1",
    "react-star-ratings": "^1.3.0",
    "react-image-gallery": "^0.8.6"
  },
  "scripts": {
    "build-css": "node-sass-chokidar src/ -o src/",
    "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive",
    "start-js": "react-scripts start",
    "start": "npm-run-all -p watch-css start-js",
    "build-js": "react-scripts build",
    "build": "npm-run-all build-css build-js",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "devDependencies": {
    "redux-devtools-extension": "^2.13.2"
  }
}

I also attached the debug log 2018-01-14T15_07_27_354Z-debug.log

Can anyone tell me how i can fix this?

@newyork-anthonyng
Copy link

@borisyordanov The Read more here link leads to this page.

It provides some work-arounds; I hope that helps.

@borisyordanov
Copy link
Author

@newyork-anthonyng I got it working with step 3, however, i feel like this is a bug with this package and attempt to fix it should be made.

MelkorNemesis added a commit to MelkorNemesis/react-html-email that referenced this issue Apr 10, 2018
@capaj
Copy link

capaj commented Apr 10, 2018

@borisyordanov this should be fixed. We just ran into issue with this in IE 11 on our app. @MelkorNemesis's pull request should be merged IMHO.

MelkorNemesis added a commit to MelkorNemesis/react-html-email that referenced this issue Apr 10, 2018
@Amit-Milli
Copy link

This is not the only place where build .. failes owing to syntax. There are multiple places at which it fails..
@MelkorNemesis you should incorporate that too in your PR

@FrenchTechLead
Copy link

is the fix pushed to npm ? i still got the problem on builds.

@kennedyrose
Copy link

Same here. Specifically:

  SyntaxError: Unexpected token punc «(», expected punc «:» [./~/react-html-email/lib/PropTypes.js:26,0]

@SCasarotto
Copy link

Still seeing this issue as well. Is there a timeline on fixing this?

@FrenchTechLead
Copy link

Hey since this issue has not not been fixed here i finished by using a fork of this library but fixed :
https://www.npmjs.com/package/react-html-email-browsers

@SCasarotto
Copy link

SCasarotto commented Aug 24, 2018

@Meshredded I tried installing and using your package and received the following error while running my project in development.
Module not found: Can't resolve 'react-dom/lib/DOMProperty' in '.../node_modules/react-html-email-browsers/lib'.
I am going to stick to including the original package in my src folder. I am going to stick to that until I find the time to fix this.

@SCasarotto
Copy link

Update: With Create-React-App 2 this should no longer be a problem since it gets compiled. I yarn added this package and moved all my references to it instead of my "in src" version.

@rikardocorp
Copy link

Change the dependency: react-html-email by react-html-email-browser
This solves the problem when you try to compile the project

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

Successfully merging a pull request may close this issue.

8 participants