While attempting to incorporate Typescript into my Gatsby project after the fact, I encountered a cryptic error from NPM:
npm ERR! code EOVERRIDE
npm ERR! Override for @types/react@* conflicts with direct dependency
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/josephmasongsong/.npm/_logs/2022-11-28T22_21_01_949Z-debug-0.log
The log provides further details:
(log details omitted for brevity)
I'm struggling to pinpoint the source of the "conflict with direct dependency" based on the logs.
I've experimented with using both the --force
and --legacy-peer-deps
flags during the npm i
command, but unfortunately, neither approach has resolved the issue.
In essence, my expectation is for the dependencies to install seamlessly as usual.