ACLClouds
ACLClouds

npm shows ENOENT: package.json is missing

Find the root of the project and avoid launching npm in the wrong folder.

ENOENT package.json means that npm is working in a folder that does not contain the manifest. The file may be missing, incorrectly named, or located in a subfolder after Git import.

Step-by-step procedure

  1. List root

    Open Files and look for package.json. Check that it is not in a folder created by the GitHub archive.

  2. Correct the order

    Use cd my-project && npm start or set the correct working directory in the script.

  3. Check name

    Package.json with a capital letter is not recognized under Linux.

  4. Create only if necessary

    Only use npm init for a new project; on an existing project, get the real manifest from the repository.