In order to utilize the desired package, it must be built or compiled accordingly. For instance, if using library code written in TypeScript, you will need to compile the .ts files into a JavaScript bundle and place the resulting output in the dist folder based on the specific structure of the library.
For your particular situation, follow these steps:
- Clone the forked library repository
- Execute
npm install
inside the cloned repository
- Run a script from package.json to generate the build (e.g.,
npm run build
)
- Commit the result, ensuring to include the required dist directory while also verifying the contents of .gitignore for any necessary modifications before committing
- Push these changes to your fork, naming the branch something like "branch_with_dist"
- Utilize a command similar to
npm i username/repo#branch_with_dist
to install the forked version