Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plmercereau/npm-vs-pnpm
https://github.com/plmercereau/npm-vs-pnpm
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/plmercereau/npm-vs-pnpm
- Owner: plmercereau
- Created: 2022-12-09T17:11:59.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-09T17:17:31.000Z (almost 2 years ago)
- Last Synced: 2024-10-23T09:39:46.088Z (16 days ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##
Both `yarn`, `npm` and `pnpm` support workspaces, but in a slight different way.
Npm's adoption of workspaces is quite new, and we were likely using an `npm` version that were not using them. We now are.
This repo is a basic monorepo set with `pnpm`. What we want to do is to install eveything in the `nhost` directory without taking into account the rest of the repo:
```sh
cd nhost
npm i
```Output:
```
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:*npm ERR! A complete log of this run can be found in:
npm ERR! ~/.npm/_logs/2022-12-09T17_15_24_731Z-debug-0.log
```Npm is resolving the parent `package.json`, and tries to install the entire workspace. But in the `unrelated` package, a dependency is using the `pnpm` syntax: `"workspace:*"`.
Therefore it fails.To solve it:
```sh
cd nhost
npm i --no-workspaces
```