Search code examples
yarnpkgstrapi

How can I uninstall the globally installed "create-strapi-app"?


I moved to a new computer and need to revive old projects (mostly vue, quasar). To do so I run yarn install, then yarn global add @quasar/cli. After the second command I get an error:

error create-strapi-app@4.0.6: The engine "node" is incompatible with this module. Expected version ">=12.22.0 <=16.x.x". Got "18.12.0"
error Found incompatible module.

I did install the strapi cli in a previous project, but I thought that I removed it again using yarn global remove strapi:

> yarn global remove strapi
error This module isn't specified in a package.json file.

So I wonder where the error comes from. I checked the global dir (yarn global dir), but there is no strapi cli neither any strapi package at all.

How can I remove the create-strapi-app error? (I do not want to change the node version; I want to remove the error.)


Solution

  • you need to edit the file (macOS)

    /Users/[username]/.config/yarn/global/package.json

    (On Windows, the path is something like this: %LOCALAPPDATA%/Yarn/config/global)

    then delete string create-strapi-app enter image description here

    then check the global list of package

    yarn global list

    after these steps, everything should install without problems