Reputation: 4302
I forked and modified a git repo, then tried to install it with npm i {repo name}
At first I thought it installed correctly.
// package.json
"react-big-calendar": "git+https://github.com/seanprpl/fkCalendar.git",
But referencing this fork during import throws an exception during compile.
./pages/admin/calendar/index.js:5:0
Module not found: Can't resolve 'react-big-calendar'
3 | import Header from '../../../modules/Header/Header';
4 | import { Container } from '../../../layouts/components';
> 5 | import { Calendar as RBCalendar, momentLocalizer } from "react-big-calendar";
6 | import moment from "moment";
7 |
8 | const localizer = momentLocalizer(moment);
Does anyone know why this result may happen and how to fix it?
Upvotes: 1
Views: 667
Reputation: 74899
The project has build steps that would be run before a publish to npm.
If you want to source the package from git, all the build output will need to be added to the repo.
It looks like the lib/
and dist/
directories that are gitignored are the main entry points.
Upvotes: 1