command “start” not found.

yarn run v1.12.3

Do you want to request a feature or report a bug?
bug

Does anyone know why “yarn start” isn’t working? I’ve tried to follow the instructions for error recovery, but no luck.

image

Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.
Jasons-MBP-2:views-test jkidd$ yarn start
yarn run v1.12.3
$ react-scripts start

There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

“babel-eslint”: “9.0.0”

Don’t try to install it manually: your package manager does it automatically.
However, a different version of babel-eslint was detected higher up in the tree:

/Users/jkidd/Desktop/PROJECTS/REACT_Projects/node_modules/babel-eslint (version: 8.2.6)

Manually installing incompatible versions is known to cause hard-to-debug issues.

If prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove “babel-eslint” from dependencies and/or devDependencies in the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:

  1. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
    This may help because npm has known issues with package hoisting which may get resolved in future versions.

  2. Check if /Users/jkidd/Desktop/PROJECTS/REACT_Projects/node_modules/babel-eslint is outside your project directory.
    For example, you might have accidentally installed something in your home folder.

  3. Try running npm ls babel-eslint in your project folder.
    This will tell you which other package (apart from the expected react-scripts) installed babel-eslint.

If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.

P.S. We know this message is long but please read the steps above 🙂 We hope you find them helpful!

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Jasons-MBP-2:views-test jkidd$ npm install
npm WARN saveError ENOENT: no such file or directory, open ‘/Users/jkidd/Desktop/PROJECTS/REACT_Projects/package.json’
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open ‘/Users/jkidd/Desktop/PROJECTS/REACT_Projects/package.json’
npm WARN @reach/router@1.2.1 requires a peer of react@15.x || 16.x || 16.4.0-alpha.0911da3 but none is installed. You must install peer dependencies yourself.
npm WARN @reach/router@1.2.1 requires a peer of react-dom@15.x || 16.x || 16.4.0-alpha.0911da3 but none is installed. You must install peer dependencies yourself.
npm WARN create-react-context@0.2.3 requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN gatsby@2.0.46 requires a peer of react@^16.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN gatsby@2.0.46 requires a peer of react-dom@^16.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN gatsby-react-router-scroll@2.0.1 requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN gatsby-react-router-scroll@2.0.1 requires a peer of react-dom@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-hot-loader@4.3.12 requires a peer of react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN REACT_Projects No description
npm WARN REACT_Projects No repository field.
npm WARN REACT_Projects No README data
npm WARN REACT_Projects No license field.

audited 59323 packages in 9.629s
found 0 vulnerabilities

Jasons-MBP-2:views-test jkidd$ yarn start
yarn run v1.12.3
error Command “start” not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Jasons-MBP-2:views-test jkidd$ yarn install
yarn install v1.12.3
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍 Resolving packages…
[2/4] 🚚 Fetching packages…
[3/4] 🔗 Linking dependencies…
[4/4] 📃 Building fresh packages…
success Saved lockfile.
Done in 4.09s.
Jasons-MBP-2:views-test jkidd$ yarn start
yarn run v1.12.3
error Command “start” not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Jasons-MBP-2:views-test jkidd$ npm start
npm ERR! path /Users/jkidd/Desktop/PROJECTS/REACT_Projects/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open ‘/Users/jkidd/Desktop/PROJECTS/REACT_Projects/package.json’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jkidd/.npm/_logs/2018-11-22T04_19_18_839Z-debug.log
Jasons-MBP-2:views-test jkidd$ npm install -g yarn
/Users/jkidd/Desktop/PROJECTS/REACT_Projects/views-test/…/bin/yarnpkg -> /Users/jkidd/Desktop/PROJECTS/REACT_Projects/views-test/…/lib/node_modules/yarn/bin/yarn.js
/Users/jkidd/Desktop/PROJECTS/REACT_Projects/views-test/…/bin/yarn -> /Users/jkidd/Desktop/PROJECTS/REACT_Projects/views-test/…/lib/node_modules/yarn/bin/yarn.js

  • yarn@1.12.3
    added 1 package in 1.078s
    Jasons-MBP-2:views-test jkidd$ yarn start
    yarn run v1.12.3
    error Command “start” not found.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    Jasons-MBP-2:views-test jkidd$

Author: Fantashit

1 thought on “command “start” not found.

Comments are closed.