I am trying to learn React and I am using a private repo to start with it.
I run yarn start
in the directory of the repo but I get the error message:
yarn run v1.13.0 error Command "start" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I have both node and yarn installed.
For node:
v10.15.0 node is /usr/local/bin/node
For yarn:
1.13.0 yarn is /usr/local/bin/yarn
I tried to reinstall both node and yarn but I get the same error message. moreover I tried to remove the yarn chance via yarn cache clean
but nothing seems to work.
The package.json
contains the following:
{ "name": "02-Manipulating-Strings", "version": "1.0.0", "author": "ssaunier", "license": "UNLICENSED", "private": true, "devDependencies": { "eslint": "^4.7.2", "eslint-config-airbnb-base": "^12.0.0", "eslint-plugin-import": "^2.7.0", "jest": "^21.1.0" }, "scripts": { "test": "(eslint lib || true) && jest" } }
The directory is organised in the following way:
If you run yarn <script>[<args>] in your terminal, yarn will run a user-defined script. More on that in our tutorial on yarn run. When you run yarn <command> [<arg>] on the command line, it will run the command if it matches a locally installed CLI. So you don't have to setup user-defined scripts for simple use cases.
npx and yarn' 8080 'cypress run' starting server using command "http-server -c-1 ." and when url "http://localhost:8080" is responding running tests using command "cypress run" Starting up http-server, serving . ... $ yarn start-test 'http-server -c-1 . ' 8080 'cypress run' yarn run v1.
The packages are the same as on the NPM registry. Yarn is basically a new installer, where NPM structure and registry is the same.
Check the ignore-script config If you see the start script is present inside your package. json file but still can't run the script, you need to check the console output. If there's no output at all, then you may have the ignore-scripts npm configuration set to true .
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
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With