https://github.com/filipoliko/npm-install-overrides-error
https://github.com/filipoliko/npm-install-overrides-error
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/filipoliko/npm-install-overrides-error
- Owner: Filipoliko
- Created: 2025-07-29T13:33:37.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-30T05:34:26.000Z (11 months ago)
- Last Synced: 2025-08-29T06:17:58.785Z (10 months ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# npm-install-overrides-error
First start local NPM registry with Verdaccio:
```bash
npx --registry https://registry.npmjs.org/ verdaccio --config ./verdaccio.yaml
```
Then publish the packages to the local registry:
```bash
./publish.sh
```
Then install the packages with the following command:
```bash
npm install
```
Try different NPM versions (NPM < 11.2 works, while NPM >= 11.2 does not work).
## npm pack
You can also use `npm pack` to create tarballs of the packages instead of publishing them to the registry:
```bash
./pack.sh
```
Change the contents of the `package.json` file.
```json
{
"name": "web",
"version": "0.0.0",
"dependencies": {
"package-a": "./package-a-1.0.0.tgz",
"package-b": "./package-b-1.0.0.tgz",
"package-c": "./package-c-1.0.0.tgz"
},
"overrides": {
"package-b": "./package-b-1.0.0.tgz",
"package-c": "./package-c-1.0.0.tgz"
}
}
```
Now you can run `npm install` again and it will fail again, but the error message is a bit less clear.