pughpugh / react-countdown-clock

HTML5 canvas countdown clock React component
ISC License
187 stars 83 forks source link

npm run build fails to minify due to transpiling to ES6 #54

Closed sandy0201 closed 6 years ago

sandy0201 commented 6 years ago

Hi,

I am building our project using Team City, and the build fails with the below error message:

Failed to minify the code from this file: ./node_modules/react-countdown-clock/build/react-countdown-clock.js:1:10143 Read more here: http://bit.ly/2tRViJ9

Will you be able to fix this issue? Or if I fork, do you have any suggestions on how this can be fixed?

Looking forward to your response.

Thank you.

Kind regards.

pughpugh commented 6 years ago

Hi,

I suspect it was due to last two builds being run using a newer version of Webpack.

You could roll back to 2.1.0 if you want a quick fix and I will look into transpiling to ES5 later today. I imagine it's just a change to the Webpack config that is needed.

Thanks

sandy0201 commented 6 years ago

Hi Hugh,

The build failed on version 2.1.0, therefore not sure what the issue was. Do you perhaps know? Okay sure, that would be great.

Thanks so much!

pughpugh commented 6 years ago

That is a little odd. I'm pretty sure the build has changed to es6 at 2.2.0, so I'm not sure why 2.1.0 does not work. Are you getting the same build error?

I've pushed a version to master, that I believe is now ES5. Would you be able to try that, before I publish it to npm?

sandy0201 commented 6 years ago

I haven't tried building my project again on Team City with the new version 2.3.0 yet. But I was getting the error on version 2.1.0. The error only happens on Team City build, when I build it locally on my PC it does works.

Okay sure, will try it.

Thank you.

diegorodriguesvieira commented 6 years ago

Hi @pughpugh, can you publish the version 2.4.0?

sandy0201 commented 6 years ago

Hi Hugh,

I tried 2.3.0, and the build also fails with the same error.

I was going to try 2.4.0, but I realise, even if I copy the new files and add it to the node_modules folder of our project, when Team City runs the steps to build the project, it will override the new files that I have copied to the node_modules folder. This is because the second step on Team City is to install npm packages.

Could you please publish it to npm then I can try again?

Thank you.

pughpugh commented 6 years ago

OK, published. Let me know how you get on.

sandy0201 commented 6 years ago

The new release worked. Thank you so much for your assistance.

pughpugh commented 6 years ago

No problem @sandy0201 , happy to help.