antfu / purge-icons

🎐 Bundles icons on demand
https://www.npmjs.com/package/purge-icons
MIT License
228 stars 18 forks source link

Specify required node version #5

Closed wheatjs closed 4 years ago

wheatjs commented 4 years ago

It looks like @purge-icons/generated uses the str.matchAll function which is only supported in node version 12.x and above. My project was defaulting to using version 10.x on Netlify which was causing the build to fail. To fix this issue in my project I had to set an the ENV variable NODE_VERSION to 12.

This stumped me for a little bit, so I thought it might be a good idea to make note of this in the documentation as some people may try to use it while still being on a node version that is below 12.x.

Deploy Logs Node 10.x - Build Fails https://app.netlify.com/sites/peaceful-lamarr-c91179/deploys/5f6c9df1c6429a51efdeed3e

Node 12.x - Build Works https://app.netlify.com/sites/peaceful-lamarr-c91179/deploys/5f6c9ef192449352a6bd859c