-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
This has already been reported a while ago: npm/npm#15654
When installing a dependency from a git commit, the folders aren't downloaded.
Expected Behavior
node_modules/my_dependency
should contain not only package.json but also the src folders
Steps To Reproduce
This started because react-block-ui
package isn't maintained anymore and is stuck with React 16. I wrote a merge request Availity/react-block-ui#65 to say it also works with React 17. But waiting for it to be integrated, I wanted to use my own version of react-block-ui with my patch, available at Flaburgan/react-block-ui@0feb0f1
Here is my package.json
file:
{
"name": "XXX",
"version": "2.4.0",
"private": true,
"dependencies": {
(...)
"react": "^17.0.2",
"react-block-ui": "git+https://github.com:Flaburgan/react-block-ui#0feb0f14514d58ed98fc4943f0aab8db19d475e4",
"react-dom": "^17.0.2"
}
(...)
}
And same change in package-lock.json
.
When I run npm install
and then navigate to node_modules/react-block-ui
, I have the files (CHANGELOG, LICENCE, package.json (which contains my patch) and README) but I miss some other files, and especially I don't have the folders (src and scripts), so obviously nothing is working.
Environment
- npm: 8.5.1, 7.20.x, 7.5.x
- Node.js: 16
- OS Name: Ubuntu 21.10, 22.04, Windows 10