DEV Community

Manuela Chamoso
Manuela Chamoso

Posted on

3 1

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.

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (1)

Collapse
 
auliasabri profile image
Aulia Sabri

thanks. now i can use strapi :D

nextjs tutorial video

Youtube Tutorial Series

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay