I am new to React and, starting with building an app, I came up with a problem while installing dependencies. I wanted to include packages like material-ui/core
, material-ui/icons
, react-reveal
, react-scroll
and react-slick
.
While installing with this command:
npm install @material-ui/core @material-ui/icons react-reveal react-scroll react-slick
It showed that they've been installed, and when I started coding it didn't compile it.
That's when I came up with this error:
npm WARN @typescript-eslint/[email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/[email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/[email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev but none is installed. You must install peer dependencies yourself.
What am I missing?
try this:
It helped me.
You can also resolve this issue by just installing typescript (it's clearly written in the debug output)
$ npm install typescript
You may also use other package-managers in favor of npm like pnpm or yarn.
Update: You can also use an npm package that does this for you. Helpful when there are many peer dependencies.
The package is npm-install-peers. If you want slightly more control over these, you may want to check out install-peerdeps
Also, please do a further read on this StackOverflow answer.
You can also resolve this issue by just installing typescript (it's clearly written in the debug output)
$ npm install typescript
You may also use other package-managers in favor of npm like pnpm or yarn.
Update: You can also use an npm package that does this for you. Helpful when there are many peer dependencies.
The package is npm-install-peers. If you want slightly more control over these, you may want to check out install-peerdeps
Also, please do a further read on this StackOverflow answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With