Logo

dev-resources.site

for different kinds of informations.

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

Published at
3/28/2023
Categories
strapi
nextjs
npx
webdev
Author
manuelachamoso
Categories
4 categories in total
strapi
open
nextjs
open
npx
open
webdev
open
Author
14 person written this
manuelachamoso
open
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.

npx Article's
30 articles in total
Favicon
Improving Port Management Speed: Why I Created `port-client` to Replace `npx kill-port`
Favicon
How to install react
Favicon
npm vs npx: Choosing the Right Tool for the Job
Favicon
npm vs npx - What's the difference?
Favicon
npmใจnpxใฎ้•ใ„
Favicon
Package Manager Fight: npm vs pnpm vs npx vs yarn vs bun
Favicon
App::cpx
Favicon
NPM vs NPX: What's the Difference?
Favicon
npm vs npx โ€” What are the Basic Difference?
Favicon
Create an NPX professional card
Favicon
Diferenรงa entre NPM INIT eย NPX
Favicon
Demystifying NPM and NPX: A Dive into Package Management
Favicon
npm vs npx: Friends or Enemy?
Favicon
Understanding npm vs npx: A Developer's Guide ๐Ÿ“ฆ๐Ÿš€
Favicon
Understanding NPM and NPX in frontend Development
Favicon
A NodeJS newbie's guide to understanding NPM and NPX
Favicon
Errors when creating strapi app using the command npx create-strapi-app@latest --quickstart
Favicon
Npx, c'est quoi ?
Favicon
You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0)
Favicon
What is NPX?
Favicon
Use this NPM script to create your EditorConfig files
Favicon
Creating an npx Command
Favicon
Automatically Remove Unused Node Modules with Python
Favicon
Animated CLI Profile Card
Favicon
Useful Npx Packages for the Developer's Everyday Life
Favicon
Short Video example in 20 Seconds. Get a Github directory quickly by a simple command without installation.
Favicon
My personal business card - What's next?
Favicon
Creating my personal business card
Favicon
When to Use Global NPM Installs? Rarely
Favicon
Useful NPX

Featured ones: