score:18

Accepted answer

there is no start command inside the scripts of the package.json file.

"scripts": {
  "start": "some command to be run", // you need to add this line
  "test": "(eslint lib || true) && jest"
}

maybe you want to run the test command instead - npm test / yarn test?

score:0

i had a similar problem while i have "start" script in my package.json. eventually, i figured out that i had not saved the package.json, so i got this error. obviously, after saving the package.json the problem was resolved.

score:0

this issue happens when file "package.json" will gets deleted or changed. please check your "package.json" file.

score:0

it may sound silly, but i was having this same problem and all i did was close the program (vscode), and reopen it. i made sure it was inside the correct project folder (web) and did the process again. it worked. in my case it was just a lack of attention.

i hope your problem is as simple as mine.

hug!

score:0

i solve the problem whit this: since create-react-app 3.3.0 it's not longer recommended to use a global installation of cra.

however, after following the recommended way, uninstalling cra globally and using npm,i ran into the following problem for my new react project:

a template was not provided. this is likely because you're using an outdated version of create-react-app.

it seems like cra wasn't properly uninstalled. i had to do the following:

after uninstalling it with npm uninstall -g create-react-app, check whether you still have it "installed" with which create-react-app on your command line. if it returns something (e.g. /usr/local/bin/create-react-app), then do a rm -rf /usr/local/bin/create-react-app to delete manually.

afterward, i was able to use npx create-react-app my-app with the latest version of cra where i would have the default template for the src/ folder

score:0

nov 2020

this might happen when you clone a git repo created with an older version of create-react-app or event with another setup. first install react-scripts as

yarn add react-scripts

or

npm install react-scripts

then if having problem with react-scripts, refer to this so thread.

score:0

firstly, you can try

npm install

then

you can also try to run first npm install and then npm run or first yarn and then yarn start

score:0

i have solved my issues with the following command. try this command, hope you will get rid of the problems.

npm run start

score:0

i also face this error but in my case i think, i have done all the above steps but the error still remaining the last thing i did in my main node_module/.bin/ folder i saw there are two dependencies one is create-react-app it fine but another one is creat-app-react so i deleted this dependency and also remove from my package.json file.

so now yarn start is working perfectly.

score:0

just run command

corepack disable

if you ran the following command before

corepack enable

score:0

i was outside the project. so i type cd myproject and than yarn run

score:0

{
        test: /\.scss$/,
        include: [/vue-components|views/],
        use: [
          'vue-style-loader',
          'css-loader',
          'sass-loader',
        ],
},

put this in webpack.config.js in module object.

score:0

one of the reasons behind this is watch if you are in the right directory type cd your_file_name then type npm run dev

score:0

i had the same issue. just run

npm install --global yarn

score:1

adding this to package.json worked for me

  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },"devdependencies": {
    "babel-preset-expo": "^7.0.0"
  },

score:1

if you are using create-react-app and encountered this error, chances are you did not install create-react-app successfully.

try removing globally installed create-create-app as explained below.

template not provided using create-react-app

score:1

check your package.json that has "start" scripts. if you just have dependency list, make sure you have the following on the package.jons

"devdependencies": {
    "@theia/cli": "next"
  },
  "scripts": {
    "prepare": "yarn run clean && yarn build && yarn run download:plugins",
    "clean": "theia clean",
    "build": "theia build --mode development",
    "start": "theia start --plugins=local-dir:plugins",
    "download:plugins": "theia download:plugins"
  },
  "theiapluginsdir": "plugins",
  "theiaplugins": {
    "vscode-builtin-css": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/css-1.39.1-prel.vsix",
    "vscode-builtin-html": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/html-1.39.1-prel.vsix",
    "vscode-builtin-javascript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/javascript-1.39.1-prel.vsix",
    "vscode-builtin-json": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-1.39.1-prel.vsix",
    "vscode-builtin-markdown": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/markdown-1.39.1-prel.vsix",
    "vscode-builtin-npm": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/npm-1.39.1-prel.vsix",
    "vscode-builtin-scss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/scss-1.39.1-prel.vsix",
    "vscode-builtin-typescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-1.39.1-prel.vsix",
    "vscode-builtin-typescript-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-language-features-1.39.1-prel.vsix"
  }
}

otherwise run this on the folder where package.json is

error command "start" not found.

yarn run theia start /home --hostname 0.0.0.0 --port 8080

theia should start on port 8080 minimally.

score:1

if you get error command "start" not found. after creating new project using create-react-app you most probably would have created the app using npm.

to do it correctly delete the directory of the project and recreate the project using yarn with the following command

 yarn create react-app my-app

after that yarn start works perfectly fine.

score:1

i got the same issue. it cusses you have installed packages in wrong directory.

in cmd terminal:-(d:\project)=> my cmd file path shows

d:\projects\npx create-react-app app-react

(when you enter this command it will create new file named app-react . then you have to go into the app-react file . use this command to go to the that file "cd app-react" then enter. you will see cmd path )

d:\projects\cd app-react
d:\projects\app-react\

then install other yarn packges

d:\projects\app-react\yarn add @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^4

d:\projects\app-react\yarn add react-icons

d:\projects\app-react\yarn add react-router-dom

then yarn start

d:\projects\app-react\yarn start

if it is won't open check yarn package installed using this command

d:\projects\app-react\yarn -version
1.22.10

for install yarn

npm install --global yarn

score:1

well, i was getting this error cause i was dumb not going inside the main project folder.so it actually not able to find .json file too😁

score:1

just run following commands:

  1. npm uninstall -g create-react-app
  2. npx create-react-app foldername

score:3

you can also try to run first npm install and then npm run or first yarn and then yarn start

score:3

i had the same issue start command not found. i followed below instruction to recreate react app

. go to your parent folder in cmd
. type yarn add create-react-app
. and yarn create-react-app foldername

after installing yarn start will work.

after installing react folder

score:3

i had this problem. i figured the best way is this.

  1. npm i -g create-react-app
  2. create-react-app my-react-app //or whatever you want your project to be
  3. cd my-react-app
  4. yarn start

score:4

i got the same error message "start" command not found. my issue got resolved by following the below mentioned steps.

-open the folder in which you want to create the app using terminal then type these commands:

  1. npm uninstall -g create-react-app
  2. npx create-react-app foldername

(this will automatically install the latest create-react-app version)

-then run the command yarn start and it will work.

score:5

solved it thanks to the insight of the user: tsvetan ganev.

i was trying to run a command that it is not in my scripts. specifically, yarn start is not in the scripts part of the file package.json. to solve the issue i added the following line in scripts

"start": "webpack-dev-server --mode development",

score:6

just run

yarn add react-scripts

Related Query

More Query from same tag