An npm package I am using has been forked on github with some bug fixes and I now want to use the forked code in my project until the fork is merged.
In my package.json I change the reference in dependencies from e.g. “cool-package”: "^0.10.0" to “cool-package“: "git://github.com/developer-who-forked/cool-package.git" but this doesn’t work.
If I run npm install after updating the package.json and then go in to node_modules/cool-package/ I don’t see any /src folder or any /dist folder (all the other modules installed via normal npm seem to have at least a /dist folder).
I only see an /example folder and a /test folder alongside a package.json and a README.md. If i’d installed the package by including “cool-package”: "^0.10.0" there would be the src/ and dist/ folders.
The forked repo, or the original repo it was forked from don’t have a /dist folder - it is actually in the .gitignore file. So I think I am missing some build step that is required to create the /dist files when trying to access github repos directly in the package.json.
npm run build
I got the build folder with the compiled code. But I didn't see a dist folder. Do I need to rename the build folder as dist? – DFB May 29 '18 at 8:17npm run-script build
, maybe that would help @DFB, too?) – robx Mar 12 '19 at 10:35