React 17
axelra82 opened this issue · comments
Installing on latest react (17.x)
Could not resolve dependency:
npm ERR! peer react@"16.x" from gatsby-plugin-dark-mode@1.1.2
Looks like alvinometric made a fix, just needs merging in: #15
Yep, still waiting 😄
As a temporary fix, you can downgrade your NPM to a version less than 7
I'm using NPM 7 and have successfully installed using the --legacy-peer-deps
flag
npm i gatsby-plugin-dark-mode --legacy-peer-deps
I'm using NPM 7 and have successfully installed using the
--legacy-peer-deps
flagnpm i gatsby-plugin-dark-mode --legacy-peer-deps
It works for me, thanks!
I could use the --legacy-peer-deps
workaround locally with npm@7, but for remote CI/CD builds using Gatsby Cloud it's necessary to instruct the build process to use npm@6 instead (the downgrade mentioned above), using the engines
property in package.json
:
"engines": {
"node": "^16",
"npm": "^6"
},
This worked for me. I know Heroku's node buildpacks also respect npm
engine versions, Vercel and others probably do too.