devloco / create-react-wptheme

Create modern, React-enabled WordPress themes with a single command.
MIT License
359 stars 60 forks source link

Node version in react-scripts-wptheme-utils incompatable with other libraries. #11

Closed adigitalnative closed 5 years ago

adigitalnative commented 5 years ago

Might be overkill to do it, but I was trying to set this up with React & Redux and got an error:

yarn add redux
yarn add v1.12.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error @devloco/react-scripts-wptheme-utils@1.3.9: The engine "node" is incompatible with this module. Expected version ">=8". Got "6.11.2"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Should it be pulling in a more recent version of Node?

adigitalnative commented 5 years ago

Update: Also seeing this when attempting to install other packages... react-router, semantic-ui-react...

adigitalnative commented 5 years ago

Update: backed out to themes folder, switched to node 8 (nvm use 8), then repeated and things now seem to work/be installing. So weird/possibly idiosyncratic issue, but could hit new users who are starting with later versions of Node.

devloco commented 5 years ago

Hi, apologies for the delay.

It looks like you got the issue figured out. Older versions of NPM are not supported by Create-react-app, and thus not supported by this tool either. In fact it looks like Facebook has updated Create-react-app to not allow versions less than 8.10.

When I finally get around to getting another update out, I'll probably change this tool to match.

adigitalnative commented 5 years ago

Appreciate the follow-up! Just as an FYI/clarification in case you circle back to this in an update: The first time I tried, I was using node 11 and I wasn't able to install other packages. It wasn't until I started over with an older version of Node that I could install other libraries.

devloco commented 5 years ago

Hmm... that is strange. The error message you posted said: Expected version ">=8". Got "6.11.2"

Maybe there's a bug in the version detection code. I'll re-open this and take a look at FB's code and see if maybe they made a change that helps.

Thanks for clarifying!

devloco commented 5 years ago

And just to add a little clarification myself:

devloco commented 5 years ago

Unfortunately, I'm not able to reproduce this.

2019-03-28 13_19_53