cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
9.3k stars 1.15k forks source link

Module not found - can't resolve 'react-player' #1889

Open newenglanddroneservices opened 3 days ago

newenglanddroneservices commented 3 days ago

Hello all: I'm trying to use this component to play a youtube video of mine:

my imports look like this: import React from "react"; import ReactPlayer from 'react-player';

And i installed it using 'npm install react-player' and it said it installed 11 packages but the second import statement throws the module not found - can't resolve 'react-player' error

I'm coding in VS-Code on ubuntu 24.4

Any usual suspects on why this would happen? Thanks Harold

newenglanddroneservices commented 3 days ago

Just fixed it by installing with sudo! Without sudo there were no install errors. Then when I used it, it installed another 5 packages and cleared the error.