Moving to pnpm

Hello fellow OpenersOpeners Contributors to and users of the Openverse project.! I am happy to announce that the Openverse frontend repository has moved from npm to pnpm for package management. Please refer to that PR and its history for the rationale behind this change.

What does this mean for existing contributors?

If you already have used npm to work on the OpenverseOpenverse Openverse is a search engine for openly-licensed media, including photos, audio, and video. Openverse is also the name for the collection of related code repositories that make up the project. frontend repository, follow these steps to prepare your environment for using pnpm in the future:

  1. Delete your node_modules folder (for example, rm -rf node_modules)
  2. Install pnpm using volta by running volta install pnpm
  3. Reinstall dependencies using pnpm by running pnpm install

Now you’ll be able to run all the project scripts using pnpm instead of npm. Note that pnpm‘s “house style” leaves out the run keyword for referencing package.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. scripts, so npm run dev becomes pnpm dev. pnpm run dev will also work, it just doesn’t match what the official pnpm documentation recommends. This is similar to yarn.

For new contributors

Please follow the instructions in the repository’s README for setting up your dev environment.

If you run into any issues with pnpm package management while working on Openverse, please open a dx bug in the openverse-frontend repository here.