DEV Community

Manuela Chamoso
Manuela Chamoso

Posted on

Errors when creating strapi app using the command npx create-strapi-app@latest --quickstart

This week, I started a new project using Strapi, which is a platform that I have not used before. Everything was new to me, as I had previously worked on a project using Sanity, which required the latest version of Node 18 to function correctly. As a result, I had the most up-to-date version of Node installed on my system. However, when I attempted to run the npx create-strapi-app@latest --quickstart command, I encountered an error:

Warning: config production; Use --omit=dev

while trying to install the dependency package. I searched various resources, such as stackoverflow, github, but the only advice I found was to install Node version 14 using nvm install 14 and nvm use 14. Unfortunately, I was not able to resolve the issue using this solution on my computer. Ultimately, I found a different solution that worked for me, which was to do the following:

  • You need to first create a new Strapi project:
npx create-strapi-app my-project --quickstart
Enter fullscreen mode Exit fullscreen mode

Although the error message may persist, you will need to close and reopen the terminal before proceeding. After doing so, enter the following command:

cd my-project
Enter fullscreen mode Exit fullscreen mode

From there, you can run the npm install command with the --no-optional flag to exclude any optional dependencies:

npm install --no-optional
Enter fullscreen mode Exit fullscreen mode

Thanks to this solution, I was able to install Strapi correctly and create my project, despite using the latest version of Node. The problem has been resolved.

Top comments (1)

Collapse
 
auliasabri profile image
Aulia Sabri

thanks. now i can use strapi :D