Reputation: 23
I am new to React-Native and I wanted to install yarn
the command below is the error i received after initiaing yarn start
i also included the version of the npm
and nodejs
that i installed
PS E:\Native\confusion> node -v
v12.18.1
PS E:\Native\confusion> npm -v
6.14.5
PS E:\Native\confusion> yarn -v
1.22.4
PS E:\Native\confusion> yarn start
yarn run v1.22.4
error Command "start" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
And right here is my package.json
file
{
"name": "confusion",
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-native-scripts": "2.0.1"
}
}
Upvotes: 0
Views: 621
Reputation: 81
The problem is, that inside your package.json
there is nothing defined for a start
command. In order to fix it, you have to create a new json-node like this and fill it with whatever command you want the start script to execute:
{
"name": "confusion",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "COMMAND WHICH SHOULD GET EXECUTED GOES HERE"
}
"devDependencies": {
"react-native-scripts": "2.0.1"
}
}
After you've defined this, you can execute yarn start
and it will run your command.
Upvotes: 1