Skip to main content
Skip table of contents

JavaScript Proritize Scan - How To Solve "Invalid appPath" Error

While running the Unified Agent for Prioritize scan for JavaScript projects, there is a validation step of the package.json that is passed to the ‘appPath’ which requires a valid main entry. If the validation fails, you will see the following error message -

[ERROR] - Invalid appPath. The path should point to a package.json file with a valid main entry.

This error implies two possible issues:

  • The package.json file doesn’t contain a valid main entry

  • The file referred by the main entry doesn't exist

To resolve this, please check the following:

  1. In the package.json file, make sure there’s a main entry defined with a valid file

  2. Make sure the file exists in the referred location. The example below requires the index.js file saved in the root folder of the project:

    CODE
      {
        "name": "my-project",
        "private": true,
        "version": "1.1.0",
        "main": "index.js",
        ...
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.