6

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

git clone git@github.com: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

Akki619
  • 2,386
  • 6
  • 26
  • 56
  • 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/bin – dirbacke Sep 10 '19 at 08:09

7 Answers7

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 :)

Sletheren
  • 2,435
  • 11
  • 25
6

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

npx strapi develop

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

Daniel Karski
  • 346
  • 3
  • 13
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

Leon
  • 255
  • 3
  • 12
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
Akhil S
  • 955
  • 11
  • 16
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

vipin joshi
  • 47
  • 1
  • 9
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.