Installing React app with yarn Plug n Play

Viewed 1419

I want to make a react app with yarn using PnP(Plug and Play), so that I can install any dependencies without using node modules, so I type this in terminal:

yarn create react-app project-name --use-pnp

Then, the app has created, but when I start the server it says

    Failed to compile.

    ./src/App.js
    Module not found: You cannot require a package ("react-refresh") that is not declared in your dependencies (via "/home/path/path/path/path/project-name/src/App.js")

Then, when I install the "react-refresh" it gives me another error.
Is it possible to create react app with PnP?

2 Answers

Currently i don't use yarn pnp, use pnpm instead if you want to save your storage.

npm i -g pnpm

pnpm will save your disk space out of the box.

Related