Strapi Development mode issue
Asked Answered
S

8

7

I am new to strapi and want to start it on development mode. Below are steps I have followed so far

git clone [email protected]:strapi/strapi.git
cd strapi
npm run setup

but then while generating a project somewhere else using the development mode: i am getting error on running below command as

'strapi' is not recognized as an internal or external command operable program or batch file.

strapi new myDevProject --dev

any help? I have uninstalled strapi global as documentation pointed. Anything I am missing. Do I need to install non global version of strapi in the same directory.

Thanks

Shiism answered 9/7, 2019 at 8:17 Comment(1)
It sounds to me that you might need to setup your path to find Strapi. How to update your path is different depending on your operation system. e.i. PATH=$PATH:/path/to/strapi/binPermanency
S
6

You can install Strapi globally in your machine using npm without the need of pulling the repo manually:

npm install -g strapi@beta

Restart your terminal, then run:

strapi new [project_name] --quickstart

Then your project will start automatically :)

Salvation answered 27/9, 2019 at 11:20 Comment(0)
L
6

Putting npx before strapi will resolve this issue . So instead of strapi develop , run following command:

npx strapi develop

Lame answered 15/5, 2022 at 9:46 Comment(0)
L
1

After pull repository and install strapi@beta globally you need generate new project by command like in the bellow instructions:

  1. Create a new project

    strapi new my-project
    
  2. Start your project

    cd my-project
    strapi develop
    

Source: https://github.com/strapi/strapi

I proposse you read Quick Start Guide

Leannleanna answered 9/7, 2019 at 12:43 Comment(0)
S
1

For existing projects you are cloning on a different machine, just don't forget to:

npm install

Resolved

'strapi' is not recognized as an internal or external command

for me

Showmanship answered 28/9, 2020 at 2:8 Comment(0)
B
1

As the above answers you can install the strapi-cli globally, or once your project is created use below commands to run it

npm run build
npm start
Beige answered 28/1, 2021 at 18:14 Comment(0)
A
0

please proceed the following steps:

step1 - open node.js command prompt and type -> npm install strapi@alpha g

step2 - strapi new (anyName_You_want_toGive) --quickstart

(remove the brackets)

it should look like

strapi new anyName_You_want_toGive --quickstart

thats all.

Thanks

Aesculapius answered 13/7, 2019 at 12:5 Comment(0)
T
0

I had already deployed my strapi app in development and successfully ran strapi develop but it didnt work for me in recent times.

This did though:

npm run dev

I was able to get the local strapi host running but I did get some npm errors.

Thread answered 18/5, 2022 at 19:32 Comment(0)
P
0

Just run command npm run develop for starting strapi application.

Also you can follow more steps on Documentation here

Photoneutron answered 15/2, 2024 at 16:23 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.